0

Is there a way to load a facebook page inside my facebook application canvas page?
I tried this using ifarame inside my application page with following code.

<iframe src="MY_FACEBOOK_PAGE_URL_HERE" width="100%" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

But it doesn't allow me to load any facebook pages.
I just need to display an image of my profile + comment box including posed comments inside my canvas page.It should allow me to post comments for that image and display all previous posted comments.
Can anyone please help me with this?

Roshanck
  • 2,220
  • 8
  • 41
  • 56

1 Answers1

0

I think facebook have a frame blocker script running that prevents this kind of thing. However, if you implement the graph api and a facebook application, you should be able to access your page posts using that and then display them. The graph api explorer lets you see what connections are available

http://developers.facebook.com/tools/explorer

Here's the api http://developers.facebook.com/docs/reference/api/

And here's an example of coca cola's repsonse

http://developers.facebook.com/tools/explorer/?method=GET&path=19292868552%2Fposts

There are also methods for publishing but users will need to authorize your app

TommyBs
  • 9,354
  • 4
  • 34
  • 65
  • Thanks for the reply.I know how to access the comment posted for an image using graph api with image id.Can you please tell me how to display it with the comment box.**comment box should post comments to my profile image which is given by image id and should display all previous posted comments** – Roshanck Jul 20 '11 at 13:05
  • You'll need to create your own form for the comments box and using the graph api issue a post request to PHOTO_ID/comments Your app would also need the 'publish_stream' permission to do this. – TommyBs Jul 20 '11 at 13:14
  • You mean I have to design my own comment box in order to post comment to a photo in my profile(I know how to post a comment to a photo using graph api with PHOTO_ID/comments request).**Isn't there a way to use facebook social plunging comment box for this?** – Roshanck Jul 21 '11 at 05:21
  • I'm afraid so. The facebook plugin is designed for external content really. I tried testing it by entering the url of an image but this doesn't work. I think it must all be stored as separate entities in their databases – TommyBs Jul 21 '11 at 07:20
  • But just go to this page [link](http://developers.facebook.com/docs/reference/plugins/comments/).And click 'get code' button and save it in a php file and run(I think you already know that:-)).It display all comments displayed in that page and also allow you to comment.Once you comment it also update the facebook page. Just look at that url.It just 'example.com' and it refers to comments in that facebook page.I think we have put wrong url there.Is there a url for comments of a facebook page?I think this 'example.com' url refers to those comments in that facebook page – Roshanck Jul 21 '11 at 08:40
  • It does, as you specify the url you want the comments for. Try using the api to access: https://graph.facebook.com/ALBUM_ID/photos each photo connection in that should have a link. Use that in the example above instead of the "example.com" domain and see if that gives you the desired result. Unfortunately I'm not in a position to test this at the moment – TommyBs Jul 21 '11 at 10:23