React Native打开Facebook页面 [英] React Native open Facebook page
问题描述
我一直在尝试使用React Native Linking API打开Facebook页面。它对我不起作用。我确实安装了Facebook应用程序。这是我尝试的方法:
I've been trying to open Facebook page using React Native Linking API. It doesn't work for me. I do have Facebook app installed. Here is what I tried:
Linking.openURL('fb://page/<page_name>');
Linking.openURL('fb://profile/<profile_name>');
Linking.openURL('http://facebook.com/<page_name>');
我也尝试使用通讯库: Communications.web(url)
。没有一个适用于Facebook和Instagram。
I also tried to use Communications library: Communications.web(url)
. None works for Facebook and Instagram. However it works like a charm for Google Maps, Apple Maps, Twitter and other big guys.
我想知道我是在做错什么,还是应该发送一些Android设备?有关Facebook人士的文章,介绍如何在其应用程序中正确实现深层链接?他们显然不知道自己在做什么。
I was wondering if I was doing something wrong or maybe we should send some Android articles to those people from Facebook on how to properly implement deep linking in their apps? They clearly don't know what they are doing.
推荐答案
好,找到了一种打开Facebook的方法:
Ok, found one way to open Facebook:
Linking.openURL('fb://page/PAGE_ID');
Linking.openURL('http://instagram.com/_u/USER_NAME');
Linking.openURL('http://instagram.com/_p/PICTURE');
这篇关于React Native打开Facebook页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!