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

前端 未结 4 1497
北海茫月
北海茫月 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: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).

提交回复
热议问题