3

I want to integrate facebook fan page in my game with out leaving the game. And I also want to detect If any one like that app, I mean I want to detect "like" button pressed or not.I view this tutorial http://www.raywenderlich.com/1626/how-to-post-to-a-users-wall-upload-photos-and-add-a-like-button-from-your-iphone-app But there is only instruction to add the like button,but o detection if any one tapped the button or not.

Any one help me please.Sample code or tutorial may help a lot.

Thanks in advance. Tamanna

Tamy
  • 31
  • 4
  • 1
    Basically, you cant.. The user must be logged into facebook in your app.. Meaning, user has to be authenticated. After which, you can check the user likes and if the user has liked your page using the graph API. And the issue is that if the user has not liked your page, you have to "hack" the facebook SDK for ios to be able to point to the page to like. I would also like to know if there is another way without hacking the FB SDK for ios. – xuanweng Oct 21 '11 at 07:35
  • @xuanwneg you should add your comment as an answer. – Damien Oct 21 '11 at 13:45
  • The only way I think of doing this is checking the UIWebView delegate method and check where the user tapped it, and so maybe in the url you could know if he liked the page or tapped something else there, hope this helps. – Herz Rod Oct 28 '11 at 14:13

1 Answers1

0

The Facebook API on iOS is meant to redirect the user on the Facebook app (or website when the app is missing) in order to grant access for the like itself. This needs to be done at least once.

In order to gather information about who is liking what you can set up whatever log or backend functionality to the Facebook app that you have to create to activate the like functionality on your iOS app.

cescofry
  • 3,706
  • 3
  • 26
  • 22