using Facebook iOS SDK 2, how do I like a page? - “Application must be on whitelist”

前端 未结 4 1496
北海茫月
北海茫月 2020-12-29 17:08

How do I \"like\" a page using the new Facebook iOS SDK? (http://github.com/facebook/facebook-ios-sdk)

I\'m currently attempting to do it with:

NSMut         


        
相关标签:
4条回答
  • 2020-12-29 17:42

    This is not a bug, it's broken by design. Using Facebook API you are only allowed to liking posts (by sending post request to https://graph.facebook.com/POST_ID/likes&auth_token=...), nothing else. Right now there is only one application which is allowed to liking pages using facebook api, it's "causes".

    0 讨论(0)
  • 2020-12-29 17:46

    1)Use the facebook iOS SDk to check if the user is logged in.
    2)Once the user is logged in, load the facebook Like API into a webview.

    See http://developers.facebook.com/docs/reference/plugins/like/#
    You should load something like this (format with appropiate params where you see %@, %i):

    http://www.facebook.com/plugins/like.php?href=%@&layout=%@&show_faces=%@&width=%i&action=%@&colorscheme=%@&font=%@"

    3)Profit.

    Also, the reason the user won't have to login is because a cookie will be saved once they log in using the Facebook iOS SDK login screen (If you are doing it in your app and not Safari/FB app).

    0 讨论(0)
  • 2020-12-29 17:56

    It looks like it's a well known, but unconfirmed, bug: http://bugs.developers.facebook.net/show_bug.cgi?id=10714.

    It may help if you voted for the bug in Facebook's bug tracker.

    0 讨论(0)
  • 2020-12-29 18:00

    Partial solutions have been suggested, though the user experience is only great if the user is already logged in to FB -- this may be likely for many but not all users, so it remains an imperfect approach.

    http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html

    0 讨论(0)
提交回复
热议问题