iOS Facebook SDK - Post to Friends wall with Privacy value set to SELF not being set -


I want to set the privacy of wall posts to post on my friends wall myself.

So that only he can see, I know that it is possible because there is a property, but there is no such document how to get it.

This code I use:

  NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: toStr, @ "to", @ " {'Value': 'SELF}} ", @" privacy ", @" Facebook SDK for iOS ", @" name ", @" Build great social applications and get more installs. ", @" Caption ", @ "Facebook SDK for iOS, Facebook Integrated iOS app makes it easier and faster to develop.", @ "Details", @ "https://developers.facebook.com/ios", @ "Link", @ "https : //raw.github.com/fbsamples/ios-3.x-howtos/master/Images/iossdk_logo.png ", @" picture ", zero]; // NSLog (@ "Params% @", Parameters); [FBWebDialogs presentFeedDialogModallyWithSession: Zero Parameter: Parameter Handler: ^ (FBWebDialogResult Result, NSURL * resultURL, NSError * error) {if (error) {// In launching error or publishing a story. NSLog (@ "error in publishing story."); } And {if (the result == FB webiodyogal containing the RialDialogNot) {// user clicked the "X" icon on NSLog (@ "User canceled Story Publishing"); } Else {// feed feed callback NSDictionary * urlParams = [self parseURLParams: [resultURL query]] handle; If (! [UrlParams valueForKey: @ "post_id"]) // // the user clicks the cancel button NSLog (@ "User canceled story publication."); } Other {// user clicked the share button NSString * msg = [NSString stringWithFormat: @ "Story posted, id:% @", [urlParams valueForKey: @ "post_id"]]; NSLog (@ "% @", msg); // Show results in a cautious success (result); }}}}];   

But when I say this in the graph API:

  "privacy": {"value": ""},    

Try it, it may help.

  NSDictionary * privacyDict = [[NSDictionary alloc] initWithObjectsAndKeys: @ "SELF", @ "value", zero]; SBJSON * JasonRR = [[SBJSon Alok] IIT]; NSString * privacyJSONStr = [jsonWriter StringWideObject: Privacy Dict]; NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @ "My Message", @ "Message", privacyJSONStr, @ "Privacy", zero];   

For the purpose of privacy, set (value, friends, network, allow, reject)

  NSDictionary * privacyDict = [[NSDictionary alloc] initWithObjectsAndKeys: @ "CUSTOM", @ "value", @ "SOME_FRIENDS", @ "friend", @ "[Separate friend ID]", @ "Allow", zero];    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -