Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Open Graph Share from iOS not working without hitting Open Graph Debugger first

I am trying to get Open Graph share actions to work on iOS. It's working some what, if I request the open graph url using the Open Graph Debugger first everything works as expected. However if I don't do this the preview in the share dialog is displayed for a seconds or so and then fades out. The post button is also disabled.

What I am seeing in the backend is that if I use the Open Graph Debugger or paste the object url into my own status I am getting requests from a Facebook server (69.171.234.117). However when I share directly from the application I am seeing a request from another Facebook server (173.252.74.115) this server doesn't seem to be able to read the Open Graph data correctly.

Has anyone seen anything like this before or know what's causing it?

EDIT: I've filed a bug with Facebook for this issue. Will updated here if it changes.

EDIT2: Facebook has confirmed this bug and is working on it. The suggested workaround for now is to trigger an initial scrape by using https://graph.facebook.com/?id={url}&scrape=true when the object is created.

EDIT3: Facebook closed the bug report and claimed the issue is solved in there latest SDK. I will verify this and report back.

EDIT4: This seems to be resolved now from my testing.

like image 717
Hugo Tunius Avatar asked Nov 01 '22 03:11

Hugo Tunius


1 Answers

I encountered this issue before, it turns out that instances of custom open graph objects that are hosted on your server are instantiated only when they are related to for the first time.

Only when the first edge in the FB graph is assigned to your object is it that it obtains an Identifier and it exists in FB's records.

This first edge can only be created using the FB app or the open graph application. After that's done you will be able to get a unique identifier for your object

GET https://graph.facebook.com/?ids=YOUR_OBJECT_URL

Then you could perform the share using the returned ID

Also see this SO post which supports my claim.

like image 111
Tom Susel Avatar answered Nov 12 '22 11:11

Tom Susel