skip to Main Content

I have updated the Titanium SDK of my app to Titanium 7.2.0 GA and since then i keep getting an error when i try to share something in my app with Facebook. The app uses the facebook module version 5.7.0.

The error appears in a webview facebook when i click on the share link, the error is : “The parameter ‘href’ or ‘media’ is required”.

I’ve followed every recommandations of this page http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook and even used their example code to test but i keep getting the same error.

Here is the code :

facebookBtn.addEventListener('click, function() {
    fb.presentShareDialog({
        link: 'https://appcelerator.com/',
        hashtag: 'codestrong'
    });
});

I can’t figure out what is wrong.

Any idea ?

4

Answers


  1. Chosen as BEST ANSWER

    I ended up downgrade the version of the facebook module and it seems to work now...


  2. I had a similar issue using FB version 5.7.0’s presentShareDialog with a mode of ‘SHARE_DIALOG_MODE_NATIVE’ and a ‘link’ only (as recommended by FB) which produces no text or image in the FB app Timeline. Also Appcelerator’s GitHub documentation and samples continue to be out of date, suggesting as they do to use a ‘title’, ‘description’ and ‘picture’ property, all of which do nothing these days as I believe FB scrape relevant text and an image from the link’s target website.

    In the end I also went back to an older version of the Ti FB module – version 5.6.0. which seems to be the last one to actually work with presentShareDialog.

    Login or Signup to reply.
  3. Since I just hit this error using facebook 5.8.0 from the git repo (https://github.com/appcelerator-modules/ti.facebook) and I really don’t want to have to push an app out that uses a Facebook SDK that is 2 versions old – I added a comment refering to this page to an Appcelerator JIRA ticket that is about updating to graph 3.0.

    https://jira.appcelerator.org/browse/MOD-2430

    Regards,
    Brad.

    Login or Signup to reply.
  4. Hans here from Appcelerator! We have been pretty busy migrating to the Graph v3 API that has recently been released by Facebook. We also updated all Facebook related docs to reflect the recent privacy changes that broke some functionalities and parameters on the Facebook SDK end.

    You can also follow MOD-2430 for the current process and try the v5.9.0 pre-release version that is Graph v3 based.

    Note: The issue was that when migrating to an earlier graph version, the link property was replaced by the (undocumented) contentURL property. In module v5.9.0, using the link property will work just as before. We will try to include this module version in the next version of the core-SDK as well to ensure our developers have the latest version ready.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search