简体   繁体   中英

Facebook sharing on mobile web

Can someone tell me how to implement facebook recommendation or like on mobile (iPhone, Android) web browser?

I following the guides for plugin approach and FB.ui approach: http://developers.facebook.com/docs/reference/plugins/like http://developers.facebook.com/docs/reference/javascript/FB.ui

but, none of them gave a mobile web sharing experience for recommentation/like. All of them give me desktop version of recommendata/like page.

Is there any tutorial or examples for Facebook sharing on mobile web? Can anyone help?

Thanks.

<div id="facebook_code"><iframe src="http://www.facebook.com/plugins/like.php?href=www.facebook.com%2F[FACEBOOK USER NAME OR ID]&amp;layout=standard&amp;show_faces=false&amp;width=250&amp;action=like&amp;colorscheme=dark&amp;height=80" scrolling="no" frameborder="0" class="facebook_like_button" allowTransparency="true">

Using the like button was a little bit of a fit, but here is how you do it.

The class is so you can style and position a div, the code calls facebook's like.php script so no need to include an extra call to a js file. The code I used also removes the pop up box that you can not style with the FB faces in it, it just displays names. Leave enough vertical room, in this case 80px for the text to wrap with the BLANK likes this text.

You might have to open a web view/safari because either way you're going to have to prove that the user is logged into facebook somehow.

I'm not sure their iOS SDK supports this but have a look at it on GitHub and maybe check the forks to see if anyone has found a way to add the like button.

You may also be interested in sharing rich content and media using Kik API. It lets you integrate your mobile app into Kik Messenger and use Kik's own transport and infrastructure to share content with other mobile app users. It is also very simple to integrate - about 5 lines of code, in simpler scenarios. There is more info on Kik API website: http://www.kik.com/dev and http://apiblog.kik.com

Disclaimer: I'm one of the developers behind Kik API :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM