我尝试通过 facebook graph API 发送邀请。该链接包含一个邀请码,每次我使用 Facebook UI 对话框发送它时,链接都会发生变化。
FB.init({
appId: 'facebook_app_id',
status: true,
cookie: true,
xfbml: true
});
FB.ui({
method: 'send',
link: 'https://mywebsite.com/i/jywk2j',
name: 'You get an invitation',
to: 1
});
当我检查消息时,链接是“https://mywebsite.com”并且缺少“/i/jywk2f”。
https://mywebsite.com/i/jywk2j没有任何重定向或奇怪的状态代码或任何东西。这只是一个正常的着陆页。
有人知道我在这里做错了什么吗?
更新
应用配置
Display name: My website name
Namespace: empty
App domains: empty
Hosting url: You have not generated a URL through one of our partners (Get one)
选择您的应用如何与 Facebook 集成
Only option selected: Website with Facebook Login
With url: https://mywebsite.com
https://developers.facebook.com/tools/debug的结果
Response Code 200
Fetched URL https://mywebsite.com/i/jywk2j
Canonical URL https://mywebsite.com/i/jywk2j
应该修复的开放图警告
Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
Tiny og:image All the images referenced by og:image must be at least 200px in both dimensions. Please check all the images with tag og:image in the given url and ensure that it meets the minimum specification.
对象属性
og:url https://mywebsite.com/i/jywk2j
og:type website
og:title Title of my website