Sharekit Configuration - Facebook

I am trying to integrate sharekit into an ios application. Everything works correctly, but I have a problem with Facebook. What i have done so far:

  • created an application on Facebook (without additional settings on Facebook, like a native, etc.)
  • edited by SHKConfig.h and added | #define SHKFacebookAppID @"MyFacebookAppID"

  • URL scheme added to my app.plist: fb + appID
    Now, when I try to share something on Facebook, the Facebook application on the device opens, showing a message: you enter this application as “facebookUsername”, when I click ok I’m redirected to my application, but nothing happens, there is no sharing action .
    Am I missing something ??

+6
source share
3 answers

The solution to my problem is illustrated here by the sharekit installation guide step 6

+3
source

What do you need to do to integrate Sharekit with your application .. (recommended)

1) In fact, you do not need to set the URL scheme in the .plist file for Sharekit. This is for facebook API users only.

2) Check if you entered the api key and secret key in the SHKConfig.h file , as shown below

 #define SHKFacebookKey @"YOUR_API_KEY" #define SHKFacebookSecret @"YOUR_APP_SECRET_KEY" 

3) Make sure you "import the SHK.h file."

4) You must enable MessageUI, SystemConfiguration, and Security frameworks .

5) You do not need to do this #define SHKFacebookAppID @"MyFacebookAppID"

6) Call the sharekit action table as indicated in the documentation.

+1
source

The SHKConfig.h file seems to indicate that you are not including the “+” literal in your URL scheme. Check out the last line of this quote:

 // Facebook - https://developers.facebook.com/ // SHKFacebookAppID is the Application ID provided by Facebook // SHKFacebookLocalAppID is used if you need to differentiate between several iOS apps running against a single Facebook app. Leave it blank unless you are sure of what you are doing. // The CFBundleURLSchemes in your App-Info.plist should be "fb" + the concatenation of these two IDs. // Example: // SHKFacebookAppID = 555 // SHKFacebookLocalAppID = funk // // Your CFBundleURLSchemes entry: fb555funk 
0
source

Source: https://habr.com/ru/post/907378/


All Articles