Ich muss Aktion veröffentlicheniOS, wie Aktion auf benutzerdefiniertes Objekt zu veröffentlichen Graph Api - Facebook
Ich habe Erfolg bei der Veröffentlichung 'liking the link' von Graph API. z. B. 'abc likes www.abc.com'
jetzt bin ich bei 'liking benutzerdefinierte Objekt' z. B. 'abc mag toy1' fest und auch die Gesamtzahl der Likes zu erhalten.
Dies ist Beispielcode, die
NSDictionary *properties = @{
@"og:type": @"toy",
@"og:title": @"toy1",
@"og:description": @"This is a sample course."};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"og.likes";
[action setObject:object forKey:@"toy"];
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"toy";
FBSDKShareAPI *shareAPI = [[FBSDKShareAPI alloc] init];
// optionally set the delegate
shareAPI.delegate = self;
shareAPI.shareContent = content;
[shareAPI share];
Bearbeiten nicht funktioniert: Mein Code durch
Wechsel arbeitettoy
zu
appnamespace:toy
und
[action setObject:object forKey:@"toy"]; // to [action setObject:object forKey:@"object"];
jetzt möchte ich Gesamtanzahl der Likes auf dieses benutzerdefinierte Objekt
Danke Chris für die Antwort, jetzt gibt es einen Fehler wie "Wert für Spielzeug ist erforderlich" – Haris
können Sie einen Bericht an developers.facebook.com/bugs einreichen, damit wir mehr Informationen wie Ihre App-ID erhalten können? –
ja, sie haben gebeten, es auf Stack-Overflow lol zu diskutieren. – Haris