我做了一些探索并找到了以下的东西,这是我到目前为止所做的:
已实施自定义网址,例如myApp://
添加了FacebookAppID,显示名称到我的info.plist文件
包含Facebook SDK
通过Facebook移动托管API创建Facebook应用程序链接,并获得如下URL: https://fb.me/1601524146753610
在创建应用安装广告时,将上述网址用作深层链接。
在我的AppDelegate.m
中实现了以下功能 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
在我的AppDelegate.m
中添加了以下代码//Initialization
[FBAppEvents activateApp];
[FBSettings setClientToken:@"ca45a3a2133ae2f37ebd4d90408816e6"];
//Function to check for deferred deep link and call the method with recieved url
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url,NSError *error){
if(url)
[self application:nil openURL:url sourceApplication:nil annotation:nil];
}];
如果我错过了推迟延迟链接的内容,请告诉我 此外,如何在将iOS APP发布到appStore 之前测试相同内容。
答案 0 :(得分:10)
我已经报告了相同的Facebook支持,他们说上面提到的步骤是正确的,以实现延迟的深层链接功能。
此外,可以按如下方式测试:
选择您的应用并点击“提交”。
在底部,您会在“开发人员工具”下找到“Deep Link Tester”。 点击“测试深层链接”,然后在对话框中输入您的深层链接进行测试。
因此,执行此操作后,您需要卸载应用程序(如果已存在),然后再从应用商店安装。 您将对其进行测试的设备应安装Facebook应用程序,并使用您从app-ads帮助程序发送“延迟深层链接请求”的帐户登录。
现在,当您打开应用程序时,您应该能够看到延迟的深层链接功能正常运行。
上述步骤对我有用。
答案 1 :(得分:3)
同时选择发送通知'并且'发送延期'检查标记。
然后你会收到你的Facebook应用程序的通知。
8.将bellow键添加到info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>**Your URL Scheme** </string>
<string>**Your FB app id** </string>
</array>
</dict>
</array>
网址方案赞&#34; testScheme ://.......&#34;
FB app id喜欢&#34; fb ......... &#34;
现在我们可以测试2个案例。
应用已经在您的设备中安装了延期链接
新安装
对于第一种情况,安装您的应用程序,然后单击Facebook通知,它将被重定向到您的应用程序。
表示第二种情况,适用于新安装
卸载您的应用并将您的设备连接到xcode
然后点击deeplink facebook通知,将其重定向到appstore,不要从appstore安装,因为您发布的应用没有应用深层链接
然后你可以从xcode运行应用程序,一旦安装,就会打开你的深层链接作为第一种情况。
多数民众赞成......
注意:不要忘记实施
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url,NSError *error){
if(url)
{
// redirect to where you want
}
}];
...........
}
答案 2 :(得分:1)
其他信息:
所以你需要将应用程序部署到商店吗? - locoboy 2015年8月7日16:38
正如他们在我之前所说的那样测试Deep Link或Deferred Deep Link:
himani@himani-HP-Notebook:~/fabric-samples/first-network$ ./byfn.sh up -l node
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
2018-06-06 09:06:22.325 UTC [main] main -> INFO 001 Exiting.....
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
orderer.example.com is up-to-date
peer0.org2.example.com is up-to-date
peer1.org2.example.com is up-to-date
peer0.org1.example.com is up-to-date
peer1.org1.example.com is up-to-date
cli is up-to-date
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
Channel name : mychannel
Creating channel...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=1
+ set +x
2018-06-06 09:06:25.547 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application/Org2MSP at version 0, but got version 1
Usage:
peer channel create [flags]
Flags:
-c, --channelID string In case of a newChain command, the channel ID to create.
-f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer
-t, --timeout int Channel creation timeout (default 5)
Global Flags:
--cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth Use mutual TLS when communicating with the orderer endpoint
--keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string Ordering service endpoint
--ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer.
--tls Use TLS when communicating with the orderer endpoint
-v, --version Display current version of fabric peer server
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
)