简体   繁体   中英

Facebook Graph API: Publishing a link - OAuthException

In my website, users can share links of my app "objects" to their Facebook Wall.

This is how I post links to Facebook using the Javascript SDK and their Graph API:

var url = "/me/feed";
var message = "a user generated message"
var link = "link to an internal object of my app"
FB.api(url, "post", { message: message, link: link }, callback);

These are some of the metatags of my internal objects:

<meta property="og:video:type" content="text/html" />
<meta property="og:video" content="link to an internal object of my app"/>

Whereas I don't attach any Flash content, I'm encountering this error:

error: (#100) flash objects must have the 'source' and 'picture' attributes
type: OAuthException

So there is something I don't really understand...

The weirdest thing is that when I post the same link from Facebook Web Interface (and not through my app), everything occurs seamlessly... Indeed: I don't have any warnings or errors from the Facebook Linter tool.

Thanks in advance for your help

If you have videos you should check at what nrj12 did for example (see here http://www.nrj12.fr/nrj12-replay-3276/nrj-12-562/media/video/494835-avec-rod-janois.html )

<meta content="Nrj 12 Avec rod janois - NRJ12.fr" property="og:title">
<meta content="http://www.nrj12.fr/nrj12-replay-3276/nrj-12-562/media/video/494835-avec-rod-janois.html" property="og:url">
<meta content="fr_FR" property="og:locale">
<meta content="video.tv_show" property="og:type">
<meta content="1327098374" property="video:release_date">
<meta content="169879703048651" property="fb:app_id">
<meta content="Sport auto, nouveautés, tests, exclusivités... KILOMETRE 12, c est le nouveau magazine indispensable présenté par Anne Denis pour tout savoir sur le monde de l auto. Mais c est aussi des rubriques déc..." property="og:description">

<meta content="223" property="og:video:height">
<meta content="398" property="og:video:width">
<meta content="application/x-shockwave-flash" property="og:video:type">
<meta content="http://media.nrj.fr/436x327/mogador/00152885-minipicto-12-0_prod_12229.jpg" property="og:image">

You video:type looks weird too me cause HTML is not a video type.

Please provide the URL of the content you wish to publish if you want to get constructive help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM