我正在尝试使用facebook图形版本方法为IOS获取app_link_hosts,但我收到错误消息.任何人都可以帮我解决这个问题.Facebook和App Link的文档不清楚.
这是代码,
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
@"app name", @"name",
theUrl, @"al:ios:url",
@"app store id", @"al:ios_id",
@"app name", @"al:ios:app_name",
@"{\"should_fallback\": false}", @"web",
fbAccessToken, @"access_token",
nil
];
/* make the API call */
[FBRequestConnection startWithGraphPath:@"/(fb app id)/app_link_hosts"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
NSLog(@"Result = %@",result);
if(error) NSLog(@"error = %@",error);
}];
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误,
error = Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x8c7d4b0 {com.facebook.sdk:HTTPStatusCode=403, com.facebook.sdk:ParsedJSONResponseKey={
body = …Run Code Online (Sandbox Code Playgroud)