开发者

Add as Facebook friend on click iPhone

In my app I need to implement +add as friend type button to send Facebook friend requests. And if the user is not logged in then the login dialog should appear. I searched in Google and also in Stack Overflow and one or two questions for iOS add as friend button but with no 开发者_如何学JAVAanswer, so I could not get anything working.


It's as simple as having a link like this:

<a target="_blank" href="http://www.facebook.com/dialog/friends/?id=FACEBOOK_PROFILE_ID&app_id=FACEBOOK_APP_ID&redirect_uri=SOME_URL"> ADD AS FRIEND </a>

So the URL to use is:

http://www.facebook.com/dialog/friends/?id=FACEBOOK_PROFILE_ID&app_id=FACEBOOK_APP_ID&redirect_uri=SOME_URL

And you have to replace FACEBOOK_PROFILE_ID, FACEBOOK_APP_ID, and SOME_URL by the real values.

On the iPhone, I would open a UIWebView pointing to this URL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜