需要Facebook图形的URL ID [英] Need URL id for Facebook graph
本文介绍了需要Facebook图形的URL ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将URL的ID发布到墙上,但是文档说我可以从发布的URL中获取ID,但是该ID不可用,因为ID是URL?这是代码.
I need to get the id of the URL posted to the wall, but the documentation says I can get the id from the the url I posted, but that id isn't usable because the id IS a url? Here is the code.
推荐答案
只需发布到Graph API:
Just post to the Graph API:
curl -XPOST -F"id=https://your-url.com" \
-F"scrape=true" https://graph.facebook.com
它应该返回一些JSON,包括URL的ID:
It should return some JSON including the ID of the url:
{
"url":"https:\/\/your-url.com\/",
"type":"website",
"title":"https:\/\/your-url.com\/",
"updated_time":"2011-11-14T07:05:22+0000",
"id":"10150375340063123"
}
这篇关于需要Facebook图形的URL ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文