4
这可能是一个愚蠢的问题,但我无法弄清楚在哪里添加fb:explicit_shared布尔。我在哪里发布fb:explicit_shared iOS版sdk
使用Graph API Explorer时,我可以做到这一点,只需添加字段并将其设置为'true'即可。奇迹般有效。
但是,当我尝试从我的iOS应用程序做到这一点,它根本无法工作。
- (id<OGObject>)myObjectForObject:(NSDictionary*)object
{
NSString *format =
@"http://www.myurl.com/fbobjects/object.php?"
@"fb:app_id=<my_app_id>&og:type=%@"
@"&fb:explicitly_shared=true"
@"&og:title=%@"
@"&og:description=%@"
@"&og:image=http://www.myimageurl.com/image.png"
@"&body=%@";
id<OGObject> result = (id<OGObject>)[FBGraphObject graphObject];
// Give it a URL that will echo back the name of the wod as its title,
// description, and body.
result.url = [NSString stringWithFormat:format,
@"myapp_namespace:object",
[object objectForKey:@"title"],
[object objectForKey:@"description"],
[object objectForKey:@"title"]];
NSLog(@"%@", result.url);
return result;
}
这是直接从open graph tutorial采取的大部分,除了在那里我已经添加了FB:explicitly_shared位。
从iOS设备发布时,我需要在哪里添加此内容?任何帮助是非常赞赏:)
谢谢LukášPetr,那完全正确。现在一切正常。我感谢你的回应。 – Warblr
欢迎您:) –