Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.