Search code examples
iosfacebooksharekit

sharekit facebook not showing login page


hi I am trying to integrate fb image sharing on my app. So I decided to go with sharekit. I downloaded the latest version. I've created a facebook app and added appkey and secretkey into shkconfig.h as guided by the sharekit document. The issues no I'm facing is when I click on facebook share, fbshare screen appears and I can see the activity monitor and after sometime nothing happens and the title of the screen disappears. When I remove the app key and secret key I see the login page.What am I doing wrong or do I have to configure something else . I have added the screenshot of what's happening.

screen shot when fb share is clicked

enter image description here


Solution

  • You have to follow ALL the steps in their tutorial.

    The ones that cross my mind in your case are :

    1) Adding the appKey and secretKey to info.plist

    2) Adding these methods in your delegate class:

    • (BOOL)handleOpenURL:(NSURL*)url;
    • (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
    • (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url;

    I followed their steps one by one and it worked like a charm. Also , make sure you used this one . There's an old one too , but it's not supported.

    Hope this helps.

    Cheers!

    EDIT:

    That's the old version as far as I know. You should get the one that I linked to above and follow the instructions in the wiki section here . Before doing that please remove the old version of ShareKit that you installed. Let me know how it goes.