简体   繁体   English

如何通过Android Intent使用赞按钮打开Facebook页面

[英]How to Open Facebook Page with a Like Button via Android Intent

I'm using: 我正在使用:

fb://facewebmodal/f?href=https://facebook.com/pageName

in an Android intent (if the user has the facebook app installed) to open pageName in the facebook app instead of the browser. 在Android中使用(如果用户安装了facebook应用)在Facebook应用而不是浏览器中打开pageName。

The problem I'm running into is the page that is opened in the fb app is the correct page, ie pageName, but it doesn't have a like button anywhere on the page. 我遇到的问题是在fb应用程序中打开的页面是正确的页面,即pageName,但是页面上的任何地方都没有类似按钮。 Anyone have any ideas how to maybe pull the page up from an Android intent so that the like button is displayed as well? 任何人都有任何想法如何从Android意图中拉出页面,以便同时显示“赞”按钮?

I have tried passing different urls such as " https://facebook.com/pageId ", " https://m.facebook.com/pageName ", and variations thereof. 我尝试传递不同的网址,例如“ https://facebook.com/pageId ”,“ https://m.facebook.com/pageName ”及其变体。

The fb://facewebmodal/f?href=someUrl will always open to a page without a like button. fb://facewebmodal/f?href=someUrl将始终打开没有喜欢按钮的页面。

If you want it to open to a page with a like button you have to use fb://page/pageId where pageId is the id of the Facebook page you're trying to open. 如果您希望它打开到带有“喜欢”按钮的页面,则必须使用fb://page/pageId ,其中pageId是您要打开的Facebook页面的ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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