Where to set the “shared via” text for a Facebook

2019-03-16 10:20发布

I have an iOS app that can create shares on Facebook. The sharing itself works fine but we don't see a text for the "shared via" line as you can see in the attached image. It just says "shared a link via .". I expect the text to be "shared a link via APPNAME." instead.

enter image description here

I already tried to add some settings for the Facebook App but that did not help.

This is how I trigger the share in my iOS app:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               name], @"name",
                               caption, @"caption",
                               description, @"description",
                               url, @"link",
                               picture, @"picture",
                               nil];

[FBRequestConnection startWithGraphPath:@"/me/feed"
                             parameters:params
                             HTTPMethod:@"POST"
                      completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
                          if (!error) {
                              // ...
                          } else {
                              // ...
                          }
                      }];

Where can I make this setting? Is it a setting for the Facebook App or do I have to add that to the sharing call in my iOS app?

1条回答
SAY GOODBYE
2楼-- · 2019-03-16 10:49

I know this is a multi-tiered setup, and to be honest I'm not sure exactly which or all of these things contribute to the "shared via..." to be set, but I've currently got it working with my application so I'll give you details about what I've done and perhaps you're missing one of the below steps: (I've whited out my app-specific details)

1) In the "Settings" screen of my Facebook Developer Account I have the following:

enter image description here

Note that I have the App ID, Display Name, Bundle ID, and the "iPhone Store ID", which links to the app. If I had to guess I'd say that setting that store ID is what triggers it. It seems this leads to one of three outcomes when users click the link:

  • If a user is using an iPhone and they have the app installed, the app is launched.
  • If a user is using an iPhone and they DO NOT have it installed, they are directed to the App Store for the provided store ID.
  • Otherwise if they are on some other browser, I'm pretty sure they'll be directed to your App's Facebook Page.

2) At the bottom of the "App Details" page, there is a selection for an App Page. I did all of this stuff after creating a new facebook account for my dev team and had to be added as an admin to our App/Company's facebook business page - I was then able to link our page to the app.

enter image description here

3) I then made sure to add three things to the Plist for my application, the FacebookAppID, FacebookDisplayName, and added the fb123..... (123 being the Facebook App ID) to the URL types as shown below:

enter image description here

查看更多
登录 后发表回答