Jump to content

PHP & Twitter help


grunshaw

Recommended Posts

Hi Guys,

 

I've tried all the php / twitter api tutorials that I can find and finding them very hard, usually because a lot of the sites are inaccessible for me and my screen reader!

 

Anyway, I was hoping someone here could help. Here is what I am trying to acheive, hopefully it is simple.

 

I want to basically grab all the @ replies to a twitter account and display them on a simple html formatted page. Idealy what I would want is to just grab everything, including all updates by who I am following and put them onto a page too.

 

 

I think that cURL might be the answer here to login to twitter and grab the data and then pull it back to my page, but the question is, how can I do that without bringing in all the unneccessary stuff like the number of tweets and links that are on the twitter page. All I want is the @ replies and user s updates whom I am following.

 

If someone can please help, that would be great.

 

Best

James Grunshaw.

Link to comment
https://forums.phpfreaks.com/topic/172866-php-twitter-help/
Share on other sites

there is probably an API call to do exactly what you want, as opposed to using cURL.

 

You need curl there is no doubt about it Twitter's API is RESTful based meaning that you can get the information you want in the format you want (if available).

 

$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, 'http://twitter.com/direct_messages.xml');//note the extension can be either xml, json, rss or atom 
curl_setopt($curl, CURLOPT_USERPWD, 'username:password');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
$xml = curl_exec($curl);

Link to comment
https://forums.phpfreaks.com/topic/172866-php-twitter-help/#findComment-911106
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.