0

I want to develop a Facebook Canvas that allow user to play the contest when they like my Facebook page.

In normal process, when user click accept button mean that they grant authentication to access their information as we set in authentication such as email, user_likes, publish_actions and so on.

after authenticated, Can we use PHP Facebook SDK like a Facebook page?

Chandara Sam
  • 331
  • 3
  • 7
  • 19
  • Why not just put a normal like button on the app and not enable any functionality until the user has liked the page? Though in my opinion the whole idea is pretty user-hostile. – Iguananaut Dec 18 '13 at 03:45
  • @Chandara, only if you have users permission. Do you have it? – Jurik Dec 18 '13 at 11:24
  • @Iguananaut, there are several reasons not to use normal like button. Especially when you want do more than just like. – Jurik Dec 18 '13 at 11:25
  • @Jurik, i have permission "email, user_likes, publish_actions" and try to use this code $facebook->api("/app_ID/likes", "post", array("access_token" => $access_token) ); but it still not work – Chandara Sam Dec 19 '13 at 06:26
  • I'm a bit confused the title is completely different from the content as well the first paragraph from the 2nd paragraph, can you specify what do you so I can help – Adam Azad Dec 19 '13 at 08:26

1 Answers1

0

I haven't tested this, but you want to try $facebook->api("/PAGE_ID/likes", "post", array("access_token" => $access_token) ); not app_id? EDIT: apparently it isn't possible (anymore?) to like fan pages via app. Is it possible to "Like" a "fan page" using the Facebook SDK?

Community
  • 1
  • 1
tattvamasi
  • 845
  • 1
  • 7
  • 14
  • we can't do that, apparently. I got an error when I tested the action. Can't like fan pages via app, sorry. Eidted the answer. – tattvamasi Dec 19 '13 at 09:21