2

I want to force users to like a Facebook page before installing an application, currently I'm using the free Inno Setup installer for my applications, but I have no problem writing my own installer which allows what I want to do, problem is I don't know where to start.

How can I prevent users who didn't like my Facebook page to install the application? ofc I'll be providing a skip method for users who don't have a Facebook account.

NOTE:

I'm offering this application for free and I estimated that it will reach 1000 downloads in the first month, since I don't require any registration, I'm not getting any email/contact information from users and my FB page is the only way that I could get in touch with them, to notify them about updates and bugs and also it's a great way to encourage any possible donations.

So liking the FB page as a requirement is simply an alternative for asking user's email address. as I noted above, I'll provide a skip method too.

Omne
  • 152
  • 1
  • 8

3 Answers3

5

Long story short - you can't.

You'll have to allow your users to install the application but then block them from seeing the content. You have to allow them to install your application because only then will you have an valid access token in order to check if they liked a certain page.

I'd like to say here also that I think this type of requirement is a cheap trick and in actual fact diminishes the meaning and functionality of the like button. You are forcing people to "like" a page they might not really want to like.

BTW you might want to look at the policy checklist again - what you are doing might be considered violation of platform policy.

phwd
  • 19,975
  • 5
  • 50
  • 78
Lix
  • 47,311
  • 12
  • 103
  • 131
  • While I agree with you that it's a misuse of the functionality, I wouldn't say you can't prevent the application to be installed. – TLama Oct 14 '12 at 18:54
  • @tla - Thoughts on how one would be able to accomplish that? – Lix Oct 14 '12 at 19:02
  • I have absolutely no idea how Facebook internally works, but it's nothing else then a HTTP request response exchange and that you can do with InnoSetup. – TLama Oct 14 '12 at 19:11
  • Lix answer was helpful for me, since I don't want to loose my users on this, I'm going to let them install the app first, then I'll make the app to check if user has liked the FB page, if not, I'll prompt them on each start to like the page, I know it'll be annoying but IMO that's a price that user's should pay! – Omne Oct 16 '12 at 12:04
  • @Omne, my comment was meant just like it's technically possible to do it, nothing more. And your concept re-design sounds good (annoying though :-) – TLama Oct 16 '12 at 12:41
  • @tla - It's also **technically** possible to hack into all government agencies all over the world... This is something that Facebook actively prevents and should not be taken lightly. I have experienced being blocked at the developer level and user level from Facebook and believe me; It's not something you want to get into. – Lix Oct 16 '12 at 14:58
  • Nothing what might surprise me somehow, but I'm not doing these things. I don't even have Facebook if we're talking about it... I just said it's technically possible and that I disagree with your *you can't* statement; I would prefer to say *you shouldn't*. And if I said it's technically possible, I meant it's technically possible without considering legal or moral aspect. Nothing more or less. – TLama Oct 16 '12 at 15:09
  • That's just the thing @tla... It is conceptually possible because all you can see is the HTTP requests. In reality there are `access_tokens` and permissions involved which prevent you from simply using "nothing else then a HTTP request response exchange". Further more, if you are making comments about a certain platform you really should do a little research before hand. – Lix Oct 16 '12 at 15:18
1

I am not sure if this may sound as the best method infact it is a very nooby method, but I am sure it will work for u. In your facebook page, Mention a code (constant number/hex/anything) in the photos/about section which can only be visible to users who like that page.

And when the user is installing the setup, ask the users to enter that code in order to complete installing the app. I cannot assure you that it will work flawlessly, but atleast it will work and you are not violating any fb rules.

One drawback could be, that a user might get annoyed and decide not to install the app.

Vish
  • 333
  • 1
  • 4
  • 13
  • This is a good idea... The only problem is that you are not requiring a user to like a page - only to enter a code. Anyone can then post that code in public hence negating the requirement. – Lix Oct 16 '12 at 15:24
1

It is possible to check from Innosetup, if a user has liked a certain page. You might send a GET request with AccessToken to the Facebook API:

https://api.facebook.com/method/pages.isFan?format=json&access_token=" . USER_TOKEN . "&page_id=" . FB_FANPAGE_ID

There is also a token-less approach using the signed_request POST method, see https://stackoverflow.com/a/5100287/1163786

For sending the Request you might use an WinHttpRequest Object, like so:

WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
WinHttpReq.Open('GET', TARGET-URL, false);
WinHttpReq.Send();

Please note that the Facebook Policies does not allow this: https://developers.facebook.com/policy/#integration

Community
  • 1
  • 1
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141