开发者

Why does facebook change the link in the FB.ui send dialog?

开发者 https://www.devze.com 2023-04-06 12:51 出处:网络
I\'m creating a facebook dialog here that links to an external site (not from my domain).In the preview the link shows up correctly, but when the message is viewed in the inbox the url has been change

I'm creating a facebook dialog here that links to an external site (not from my domain). In the preview the link shows up correctly, but when the message is viewed in the inbox the url has been changed.

Specifically, I call this function:

var link = "http://someexternalsite.com/?id=xxx"
var desc = "a description"

    FB.ui(
      {
        method: 'send',
        name: 'title',
        link: link,
        picture: 'http://mysite.com/somepicture.jpg',
        description: desc
      },
      function(response) {}
    )

And the link changes (when viewed in your facebook inbox) to

http://facebook.com/someexternalsite

Is there some unwritten security pol开发者_开发技巧icy somewhere? Do I need to get permission from someexternalsite.com to link to their site?


Facebook keeps control of the links that are posted. That way if a link is to a virus or a malicious site, Facebook just needs to change their URL.


It seems that facebook take the meta og: property.

I didn't find a way to get the link I wanted without changing the og:url. Btw the picture is also erase by the og:image tag.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号