如何在 iphone 应用程序中添加类似 facebook 的页面功能?

问题描述:

我必须在 iPhone 应用程序中添加Facebook Like page"功能,任何人都可以帮助我怎么做.我已经搜索过,但没有找到任何适用于 iOS 的 API.

I have to add "Facebook Like page" functionality in an iPhone app could any body help me how do it. I have searched for it but didn't find any API for iOS.

在我的应用程序中,我必须为用户提供一个喜欢的页面选项.用户会喜欢我们的页面,然后他们将可以完全访问我们应用程序的其他内容.我怎么知道用户是否喜欢我们的页面?

In My app i have to give a like page option to users. Users will like our page and then they will get full access of other contents of our application. How can i know that user have liked our page or not?

首先在这里看我的回答 - 如何从当前应用程序通过邮件、推特和脸书分享或发布?

First see my answer here - How to share or post by mail, twitter and facebook from the current application?

在这里您可以学习如何在 Facebook 上发表评论、图片.还有示例代码,下载试试.

Here you can learn how to post comment, Image on Facebook. There is a sample code also, Download and try it.

现在来谈谈如何制作like按钮.所以对于这个 Facebook 提供了一个 POST 方法,通过它你可以发送一个像任何对象一样的请求.

Now come to your point how to make a like button. So for this Facebook has provided a POST method through which you can send a request for like any object.

这是like的方法,其中313449204401是对象的ID -https://graph.facebook.com/313449204401/likes

This is the method of like where 313449204401 is ID of object - https://graph.facebook.com/313449204401/likes

为了发送请求,您还需要一个访问令牌.如何获取访问令牌,您可以通过示例代码了解.

For sending request you will have also need an access token. How to get an access token you can know by sample code.

有关更多信息,请在此处阅读 FBGraph API 方法 - https://developers.facebook.com/docs/reference/api/

For more Read FBGraph API methods here - https://developers.facebook.com/docs/reference/api/