Search code examples
phpjavascriptfacebooktwitterflickr

Get facebook posts/events/news/gallery with javascript (or php) inside my website


I'm tryin to develop a (almost) 100% client-side dynamic website by integrating it with twitter, facebook and flickr.

I've been able so far to get the last 4 tweets (with javascript) from my client's feed, and now i was wandering if i could do the same with facebook's gallery and events from their feed.

Especially, what i need (given the facebook username/api key/whatever)

gallery

for each gallery in user's profile:

  • get the gallery name
  • get the first picture
  • get the gallery url

news/events

for each news/event/post in user's profile:

  • get the event name
  • get the event text
  • get the event picture (if provided)
  • get the event url

I don't want to use the facebook widgets with their rendering, i just need to read the json response (if there's any) and put the data inside my website (like a preview).

Since my client is pretty rusty with "computers (cit.)" but he's (not so strangely) comfortable with facebook/twitter/flickr, i tought about a solution like this before adding a database and an admin interface to our website.

I found some resources online, so i think it's possible (in a way or another). I'd like to do it in javascript, but if it's php i won't complain.


Solution

  • Check out this API to get photoes from the user profile http://developers.facebook.com/docs/reference/api/album/

    This is for events http://developers.facebook.com/docs/reference/api/event/