WPIntell

Source evidence

[Plugin: Get Latest Tweets] Plugin error

Get Latest Tweets · support · 2011-03-08T22:17:00+00:00

complaintsentiment
mediumseverity
0.92relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 22 rows with source links

13.6% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
ted_the_bad unresolved
Hi I’m getting an occasional error using the plugin. The error log from my website is as follows: [Tue Mar 08 21:03:22 2011] [error] [client 188.221.109.83] PHP Warning: file_get_contents( http://twitter.com/status/user_timeline/stephenfry.json ) [ function.file-get-contents ]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r [Tue Mar 08 21:03:22 2011] [error] [client 188.221.109.83] in /home/sites/martyn-roberts.co.uk/public_html/cycleafrica/wordpress/wp-content/plugins/get-latest-tweets/get-latest-tweets.php on line 72 Line 72 is: $json = file_get_contents($url); Is there any particular reason that the plugin would fail to get the information from twitter using the file_get_contents function? Thanks http://wordpress.org/extend/plugins/get-latest-tweets/ Nevermind, I found a solution. For anyone who may come across the same problem, change the following lines from: $url = “ http://twitter.com/status/user_timeline/$username.json” ;; $json = file_get_contents($url); return $json; to this: $curl_handle=curl_init(); curl_setopt($curl_handle, CURLOPT_URL,” http://twitter.com/status/user_timeline/$username.json” ;); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_USERAGENT, ‘Twitter’); $json = curl_exec($curl_handle); curl_close($curl_handle); return $json; I’m having the same problem sometimes. I’ve tried adding your code but this is what I got.. R / over a year ago

Comments

2 shown
ted_the_bad 2011-03-11T15:30:00+00:00

Nevermind, I found a solution. For anyone who may come across the same problem, change the following lines from: $url = “ http://twitter.com/status/user_timeline/$username.json” ;; $json = file_get_contents($url); return $json; to this: $curl_handle=curl_init(); curl_setopt($curl_handle, CURLOPT_URL,” http://twitter.com/status/user_timeline/$username.json” ;); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_USERAGENT, ‘Twitter’); $json = curl_exec($curl_handle); curl_close($curl_handle); return $json;

abuhaafidh 2012-03-07T07:55:00+00:00

I’m having the same problem sometimes. I’ve tried adding your code but this is what I got.. R / over a year ago