How can i show/get the latest 5 facebook messages i posted on facebook/twitter??? I think the developer.facebook would be to much for a simple task like this or am i wrong/? And lastly do you know of any other nice facebook integration in own websites or tutorial on the $facebook->api_client->stream_get subject
You can show latest tweets but you can't do it facebook because facebook message is not accessible by public. If you want to show your tweets on your webpage just use the below code <style> #twitter_update_list li {list-style-type: none;} #twitter_update_list span {color: #000000;background: #E6E6FA;} #twitter_update_list span a display: inline;color: #709cb2;} #twitter_update_list span a:hover {text-decoration: underline; color: #709cb2;} </style> <div id="twitter_update_list"> <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"> <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/vinoththiru.json?callback=twitterCallback2&;count=1"> </div> Code (markup): Replace "vinoththiru" with your account name
Yeah you can if your php setup has curl enabled. If you look at the code of the facebook home page you will see two fields named="email" id="pass" and some other fields. Send values for all the fields in the form to the address specified by the form using curls POST facility and you will get back your home page, from which you can scrape the messages. I would suggest that you do not do this every time a page loads but maybe at a random time twice an hour (keep a timer file and write the current time()+1200+rand(1,500) to it then look at this every page load ind if current time()> file value get your messages and save them to a file, if not get the contents of your messages file instead.
He could also make his profile public, which would save the need to login using curl, simply grab the data using curl from facebook.com/username ?
Think you need to learn more about sessions. If a cookie cannot be created then the system switches to using sessid instead.
hi guys, I have almost got a workable solution. I found this awesome post blog.jylin.com/2009/10/01/loading-wall-posts-using-facebookstream_get/ and it shows how to set your permanent session key. Now i have this test to show the latest 5 posts on facebook $i=0; foreach($wall['posts'] as $post) { //var_dump($post); echo '<a href="'.$post['permalink'].'" >'.$post['message'].'</a><br/>'; $i++; if($i == 5) { break; } } Code (markup): 1/ How can i make a cleaner limit foreach??? 2/ What would you display on your own website (just make a var_dump and you see which data you get from facebook)?? 3/ Oh and i have develop a function which shows my latest 3 youtube thumbs + description on my website? any pointers?? regards