本文介绍了来自网址的Facebook ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
给出一个Facebook网址,例如 facebook/cnn ,有什么方法可以获取该页面的ID不足以刮取吗?
Given a facebook url such as facebook/cnn, is there any way to get the ID of that page short of scraping it?
推荐答案使用图形API进行此操作更好(并且合法).只需执行对graph.facebook/cnn的API请求,并从响应中获取ID.
It is better (and legal) to do this with graph API. Just perform API request to graph.facebook/cnn and get id from the response.
这是cnn的响应:
{ "id": "5550296508", "name": "CNN", "picture": "profile.ak.fbcdn/hprofile-ak-snc4/hs178.ash2/41813_5550296508_728_s.jpg", "link": "www.facebook/cnn", "category": "Company", "website": "wwwn\nwww.ireport\n", "username": "cnn", "company_overview": "TRIVIA FROM THE CNN TOUR...", "products": "CNN US...", "likes": 1689936 }更多推荐
来自网址的Facebook ID
发布评论