Facebook SDK failed to generate preview for user only when opengraphobject.setproperty(“og:url”) is set

后端 未结 2 1816
-上瘾入骨i
-上瘾入骨i 2021-01-14 23:47

I have an app where I want to share a history in facebook. I don\'t have a web for my application. I only want to share an image with title and description and if it\'s posi

2条回答
  •  情深已故
    2021-01-15 00:52

    If you don't have a web component, then do not set a url in the og object. If you set a url, facebook will try to go scrape that url, and if the OG metadata scraped from there doesn't match what you've provided, then it will fail.

    If you want to add a bitmap to your OG action, in addition to what you're currently doing, you must also add a NativeAppCallContentProvider to your manifest. See the docs here: https://developers.facebook.com/docs/reference/android/current/class/NativeAppCallContentProvider/ This is how the Facebook app can actually get the bitmaps you're trying to send.

    Lastly, have a look at the Scrumptious sample app that ships with the sdk. It has an option (if you "skip login") that creates a new OG object, with an image attachment.

提交回复
热议问题