1

I am trying to replicate the functionality of the page below where there are two tabs (Lady Gaga and Enrique Iglesias) which force users to like a page before they are able to use the app. With the latest Facebook changes is it still possible to be done? I am in the process of building my first app have been googling for the past week and have not gotten anywhere. I am literally pulling my hair :(. I hope somebody can help. Thanks in advance,

http://www.facebook.com/2DayFM

Ozair Kafray
  • 13,351
  • 8
  • 59
  • 84
Rogerio Pinto
  • 21
  • 1
  • 3

3 Answers3

2

The only way this can be done is by inspecting the signed_request http post parameter in server side code that Facebook sends your site when it loads your page. Here is an example of how to do it in PHP, although its basically the same process in whatever language you know.

bkaid
  • 51,465
  • 22
  • 112
  • 128
1

It is a violation of Facebook's Platform Policies to incentivize the "Like" action. See https://developers.facebook.com/policy/#integration

Josh Enders
  • 113
  • 3
  • You mean, you **aren't allowed**. Technically it would be possible, I think. – nalply Oct 21 '12 at 17:38
  • Correct. Edited to reflect this. – Josh Enders Mar 19 '13 at 20:10
  • Now it's ok apparently. "Only incentivize a person to log into your app, like your app’s Page, enter a promotion on your app’s Page, or check-in at a place. Don’t incentivize other actions. " (From your link, @JoshEnders.) – Henrik Jul 24 '14 at 12:53
0

You can use an FQL query on the connection table to do this.

select target_id from connection where source_id = 297200003 and target_id = 1024709214

To do an FQL query you can use FB.Data.Query or you can test it on command line using cURL. You need to pass the access_token for the user.

curl "https://api.facebook.com/method/fql.query?format=json&query=selecn+where+source_id=297200003+and+target_id=1024709214&access_token=..."
Bemmu
  • 17,849
  • 16
  • 76
  • 93
  • The answer from OffBySome worked perfectly but thanks for your help. I ended up looking at FQL and it seems like a great tool to use for my projects. Thanks! – Rogerio Pinto Jul 11 '11 at 05:29