Facebook Open Graph for answers ?

8.74K viewsIssues
0

Hi,

If trying to share an answer on Facebook, it retrieves the image of the website + the title of the question, and none of this seems to be customizable (I actually use SEO Framework on your recommendation but it doesn’t fix the issue)… It would be nice to automatically retrieve the profile picture of the author of the answer at least as og:image, and get the beginning of their answer as og:description.

Social network are really important so I guess this would benefit everyone.

Thanks for your help !!

0

Update : it takes the content of the right answer as og:description only if you hack Anspress core to delete the # parameter in the answer of the url (which I did in the past). But now for many reasons I have to go back to the normal urls as they were designed originally by the Anspress team. And if you do, it will always take the content of the second answer (which is the answer that would normally appear on top of the page)

Exemple : Let’s assume my question url is :

  • mysite.com/q/my-question/

and I have 3 answers, with ID 1, 2 and 3, appearing in the following order on my page : ID1 appears above ID2 which appears above ID3.

If I type this in Facebook debugguer : mysite.com/q/my-question/?show_answer=2#answer_2 it will take the description of the shared content from the answer 1 and not from the answer 2.

But if I type this in FB debugguer : mysite.com/q/my-question/?show_answer=2 (that means, removing the # parameter) facebook takes properly the content of the answer 2 (see *NB below on how I achieved this)

Now I tried on a normal FAQ page (not Anspress) on my website to see if that was due to Facebook not handling # properly or if was a bug belonging to Anspress. And it works properly there, so there is something in Anspress that makes it buggy…

(*NB : You must also know that Anspress originally uses canonical urls for both mysite.com/q/my-question/?show_answer=2#answer_2 and mysite.com/q/my-question/?show_answer=2, in both cases the canonical url would normally be mysite.com/q/my-question/ so Facebook would not make any difference and that would be a problem. To prevent that I just removed the canonical urls from Anspress that is why now Facebook can take the right description on mysite.com/q/my-question/?show_answer=2.)

 

You can see a live example of all this here :

  • https://developers.facebook.com/tools/debug/sharing/?q=http%3A%2F%2Fbeastof.com%2Ffr%2Fq%2Fcomment-bien-shabiller-pour-un-homme%2F%3Fshow_answer%3D999%23answer_999
  • https://developers.facebook.com/tools/debug/sharing/?q=http%3A%2F%2Fbeastof.com%2Ffr%2Fq%2Fcomment-bien-shabiller-pour-un-homme%2F%3Fshow_answer%3D999

Same answer, different Facebook results !

 

Why would it be so ? Thanks for your answer  🙂

commented on answer

Hello,
Can you give me access to your site? I am bit busy so I will try directly in your site.

You are viewing 1 out of 6 answers, click here to view all answers.