vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vBulletin to Twitter, live tweets of new threads (https://vborg.vbsupport.ru/showthread.php?t=234288)

blake247 01-28-2010 03:04 AM

Quote:

Originally Posted by LbR (Post 1968260)
Getting this error

PHP Code:

You must be authenticated to access shorten on line 193 in /home/emonxco/public_html/forum/bitly.php
#0 /home/emonxco/public_html/forum/bitly.php(382): Bitly->doCall('shorten', Array)
#1 /home/emonxco/public_html/forum/newthread.php(262) : eval()'d code(10): Bitly->shorten('http://www.emon...')
#2 /home/emonxco/public_html/forum/newthread.php(262): eval()
#3 {main}


WarningInvalid error type specified in [path]/vb/vb.php on line 284 


I have the same error

kisanjong 01-28-2010 07:53 AM

i was getting the You must be authenticated to access shorten on line 193 error but then realised i had a space after my api code, this was the problem so please check your bitly api codes.

working great thanks installed 5*

zachsg 01-28-2010 08:51 AM

Installed, properly inserted my bit.ly username and API key and twitter details, post does not happen. No errors, nothing. Just doesn't happen. Something wrong?

Using vB 4.0.1 w/ vbSEO.

Moondust 01-28-2010 09:12 AM

no Spaces in the API Key and username, all ceck more as 10x Times..... only the Errorcode :-(

IndigoSociety 01-28-2010 09:27 AM

This is great

tazattitude 01-28-2010 10:19 AM

Works great! Installed and tested. Neat!!! Anxious to see what it draws!

Thanks for sharing!

cagbaazee 01-28-2010 12:45 PM

Nothing is working here.. please note is it okay or not

// The array below are the ids of non-public forums, update these to be your admin forum ids or anything non-public by default
if (!in_array($foruminfo[forumid], array(198,58,91,128,52,183,189,199,70,7,31,59,57,6 ,54,52))) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';

// http://classes.verkoyen.eu/twitter/
require_once 'twitter.php';

$bitly = new Bitly('<guru>', '<R_57532588ecb8603c0f14b5b75cbf>');
$shortUrl = $bitly->shorten('http://www.guru.info/vbforum/showthread.php?t='.$newpost[threadid]);

$tweet = '';
if (isset($newpost['prefixid']) && $newpost['prefixid'] != '') {
$tweet = $vbphrase['prefix_'.$newpost['prefixid'].'_title_plain'].' ';
}
$tweet .= $newpost['title'].' '.$shortUrl;

$twitter = new Twitter('<guru>','<zyxjimmy>');
$twitter->updateStatus($tweet);

cagbaazee 01-28-2010 12:57 PM

Bit.ly username and Api Key - u mean wahera69@hotmail.com and R_5e3b37532588ecb8603c0f14b5b75cba

or

guru and R_5e3b37532588ecb8603c0f14b5b75cb

which is correct

tazattitude 01-28-2010 01:02 PM

cagbaazee - I did the same thing you did, I left the " < " and the " > " in there. Remove those and it should work as long as you have your un, pw, and the key correct

the bitly should look like this (example)
$bitly = new Bitly('testUser', 'R_hj3456hgf3hig56hi2gf6');
not $bitly = new Bitly('<testUser>', '<R_hj3456hgf3hig56hi2gf6>');

same with the twitter line

Nordinho 01-28-2010 01:15 PM

Quote:

Originally Posted by buro9 (Post 1968373)
I don't think it is, it errors in the bit.ly library when it tries to parse the JSON.

The JSON is fine, it's the call to deserialise it that fails.

This: http://php.net/manual/en/function.json-decode.php

I'll have a stab around tomorrow and see if I can figure it out.

It seems so indeed, commented out the json errors and it posts to twitter (obviously not the shortened url though)


All times are GMT. The time now is 02:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01467 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete