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)

buro9 01-27-2010 08:07 PM

Quote:

Originally Posted by Nordinho (Post 1968312)
Allrighty, the curl error is gone. Now on to the next one ;)

Scary. You are having fun.

In bitly.php where you have these lines:
PHP Code:

 // we expect JSON so decode it
$json = @json_decode($responsetrue); 

Could you echo $response and then return; out of there so that I can see what the hell bitly returned. The JSON from them should be fine, so I want to be sure it's working at all.

Nordinho 01-27-2010 08:33 PM

Quote:

Originally Posted by buro9 (Post 1968329)
Scary. You are having fun.

In bitly.php where you have these lines:
PHP Code:

 // we expect JSON so decode it
$json = @json_decode($responsetrue); 

Could you echo $response and then return; out of there so that I can see what the hell bitly returned. The JSON from them should be fine, so I want to be sure it's working at all.

Lol, well it's a mod that will save me a lot of time, and an error was fixed, so keeping it positive!

Not to sure what to change exactly though. Tried echoing it out. But I'm getting the same error all the time, so I'm echoing out something wrong.

buro9 01-27-2010 08:37 PM

Basically this:
PHP Code:

echo $response;
exit(); 

You need to see what is coming back before the exception gets thrown.

Nordinho 01-27-2010 08:40 PM

Quote:

Originally Posted by buro9 (Post 1968355)
Basically this:
PHP Code:

echo $response;
exit(); 

You need to see what is coming back before the exception gets thrown.

Ah oke,

here we go:

Quote:

HTTP/1.1 200 OK Server: nginx/0.7.42 Date: Wed, 27 Jan 2010 22:39:49 GMT Content-Type: text/html;charset=utf-8 Connection: keep-alive Content-Length: 376 Allow: GET, HEAD, POST Set-Cookie: anonu=psu__ba8fda56-d8f2-4008-9a45-78795aec6c7e---59cd87d95c4bc62d01c0f3740f056d73; Domain=.bit.ly; expires=Wed, 28-Dec-2011 17:39:49 GMT; Path=/; Version=1 Set-Cookie: bsession=e165dfe2-db36-4c65-bde9-3329f63d8df9---7a0a8596aff915c72e69e50dcc22b10a; Domain=.bit.ly; expires=Wed, 28-Dec-2011 17:39:49 GMT; Path=/; Version=1 { "errorCode": 0, "errorMessage": "", "results": { "http://www.nordinho.net/vbull/showthread.php?t=44452": { "hash": "aLLETL", "shortCNAMEUrl": "http://bit.ly/91KLR4", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/91KLR4", "userHash": "91KLR4" } }, "statusCode": "OK" }

buro9 01-27-2010 08:43 PM

Strange... it's working perfectly fine.

What version of PHP are you using?

Nordinho 01-27-2010 08:46 PM

Quote:

Originally Posted by buro9 (Post 1968360)
Strange... it's working perfectly fine.

What version of PHP are you using?

PHP 5.2.9

It does post as well in bit.ly, it seems to fail at connecting with twitter

buro9 01-27-2010 09:01 PM

Quote:

Originally Posted by Nordinho (Post 1968363)
PHP 5.2.9

It does post as well in bit.ly, it seems to fail at connecting with twitter

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.

Nordinho 01-27-2010 09:05 PM

Allrighty, thanks for the help sofar!

Jesh 01-27-2010 11:11 PM

Getting 500 internal server error, any ideas?

Bouncer222 01-28-2010 02:43 AM

This mod is all great and I love the idea, never thought of it... but..

How exactly is it helping you get visitors to your site from those viewing your twitter page? I mean...all those threads that are relayed to twitter to be posted have no link backs to your actual vbulletin site, do they? Correct me if I'm wrong.

But if it just copies threads/posts and posts it on tweeter without some sort of link back to original thread... then what's the use?

Again, correct me if I'm wrong.
And thanks for the mod!


All times are GMT. The time now is 02:55 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.01476 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_php_printable
  • (6)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