Javascript 用于发送的Facebook UI对话框正在更改发送后的链接
我尝试通过facebook graph API发送邀请。该链接包含一个邀请代码,每次我通过Facebook用户界面对话框发送该代码时,链接都会发生变化Javascript 用于发送的Facebook UI对话框正在更改发送后的链接,javascript,facebook,facebook-graph-api,facebook-javascript-sdk,Javascript,Facebook,Facebook Graph Api,Facebook Javascript Sdk,我尝试通过facebook graph API发送邀请。该链接包含一个邀请代码,每次我通过Facebook用户界面对话框发送该代码时,链接都会发生变化 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
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'丢失
没有任何重定向或奇怪的状态代码或任何东西。这只是一个普通的登录页
有人知道我做错了什么吗
更新
应用程序配置
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
的结果
打开应修复的图形警告
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
好的,我解决了这个问题。感谢@chumkiu为我指明了正确的方向
问题是我使用了子域,而我的facebook应用程序配置错误。我需要用
mywebsite.com
添加App域
,并且必须用Facebook登录删除网站
部分的子域也许你可以在App配置中强制重定向url?你能运行中的链接并返回给我们结果吗?我确实在Facebook应用中添加了此功能使用Facebook登录的网站
到我的域网站url。@如果我们的回复为200,则获取的url和规范url是正确的。一些关于og元标记丢失的警告,但我暂时删除了它们。
og:url https://mywebsite.com/i/jywk2j
og:type website
og:title Title of my website