9

We've built a Facebook Page Tab application with a Like Gate. We've done this countless times before and there's nothing unusual about this application in that regard.

Within our ASP.Net 4.0 Web Forms application, we used the Facebook C# SDK, with the latest version (6.4.2) pulled directly from NuGet and the following C# code:

public static bool IsPageLiked(string appId,
    string appSecret, string signedRequest)
{
    var fb = new FacebookClient { AppId = appId };
    dynamic req = fb.ParseSignedRequest(appSecret, signedRequest);
    return req.page.liked;
}

We've used this code several times before and we've never had any problems with it. The app and its Like Gate are both working nicely on an Unpublished Page — so that only Page Admins who are in the appropriate App Roles can see the app.

We are seeing an intermittent error, though. This only affects some users, but those users are seeing the message reliably whenever they Like or Unlike the Page hosting the Tab app:

This content is no longer available
The content you requested cannot be displayed right now. It may be temporarily unavailable, the link you clicked on may have expired, or you may not have permission to view this page.

That error message is what you'd get if you try to access something to which you don't have permission. The users are still Page Admins, though, so their permission to view the App and the Page is not changing.

Google suggests that this is an error at Facebook's end that no-one has really found a satisfactory solution to. Oddly enough, our client isn't terribly impressed with that answer.

Does anyone have anything more-constructive they can offer? Please? :)

Owen Blacker
  • 4,117
  • 2
  • 33
  • 70

1 Answers1

-1

It is now against Facebook's policies to gate an app or content within an app based on if someone has liked your page.

See the announcement here: https://developers.facebook.com/blog/post/2014/08/07/Graph-API-v2.1/

With regards to this error - Have you set particular geographical or age restrictions for your App ID? If so, some people will not be able to see your app and an error would be shown. This is something some brands (e.g. alcohol brands) do to protect under age people from access their apps.

Simon Cross
  • 13,315
  • 3
  • 32
  • 26
  • Indeed, though it wasn't against the policies in November 2013, when I posted this issue. There were no restrictions against the AppID (oddly enough I did think to check that first). This was a bug in Facebook's code. As you've pointed out, though, it's no longer relevant; the campaign is finished and the functionality is now deprecated. – Owen Blacker Aug 20 '14 at 11:14