gir*_*ish 8 iphone android facebook
我想在Android和iPhone中集成facebook和like按钮.我在facebook和iphone中集成了facebook,但我没有像按钮那样集成.所以请告诉我如何在android和iphone中集成facebook like按钮.
为了整合我在android下面使用的facebook链接示例
https://github.com/facebook/facebook-android-sdk
现在我必须整合像facebook一样的按钮.
最好的祝福.
提前致谢.
看看这个很好的代码:http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html
将FBLikeButton类添加到视图中:
FBLikeButton *likeButton = [[FBLikeButton alloc] initWithFrame:CGRectMake(0, 372, 320, 44)
andUrl:@"http://www.facebook.com/pages/De-Zilk/108209735867960"];
Run Code Online (Sandbox Code Playgroud)
非常感谢AngelGarcíaOlloqui
Facebook 图形 API 中没有“赞”按钮。您可以选择一些替代方案。首先,您可以使用网络视图并在网络视图中显示“喜欢”按钮。
https://developers.facebook.com/docs/reference/plugins/like/
另一种选择是使用 facebook-android-sdk 中的 facebook 共享功能。
最后也是更通用的替代方案是使用意图并让用户选择如何共享它。(可以是任何应用程序,包括Facebook)
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "YOUR SUBJECT HERE!");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "YOUR TEXT HERE");
startActivity(Intent.createChooser(shareIntent, "YOUR TITLE HERE"));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21108 次 |
| 最近记录: |