Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://www.facebook.com/my_page_name
- http://www.facebook.com/pages/my_page_name
- http://www.facebook.com/my_page_ID
- identifier = url.substring(url.lastIndexOf("/"))
- graphUrl = "https://graph.facebook.com/" + identifier
- urlJsonData = getGraphData(graphUrl)
- url = http://www.facebook.com/southpark
- url = http://www.facebook.com/6708787004
- <?php
- function getFacebookId($url) {
- $id = substr(strrchr($url,'/'),1);
- $json = file_get_contents('http://graph.facebook.com/'.$id);
- $json = json_decode($json);
- return $json->id;
- }
- echo getFacebookId($_GET['url']);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement