0

Get facebook id from url (?ids=url) by fb graph some url are not working.

For example;

    https://graph.facebook.com/?ids=https://www.facebook.com/groups/Happypattaya

The link above work fine, so I got this json (it's right).

{
   "https://www.facebook.com/groups/Happypattaya": {
      "id": "589515601153720",
      "created_time": "2014-10-09T17:16:29+0000",
      "is_scraped": false,
      "type": "website",
      "updated_time": "2014-10-09T17:16:29+0000",
      "url": "https://www.facebook.com/groups/Happypattaya"
   }
}

But https://www.facebook.com/groups/663908986989589

and other links, as I noticed it was a numeric, I can use "preg_match" to get it if find an integer ,but I really want to grab id from fb graph anyway.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Forexury
  • 29
  • 3

1 Answers1

0

You should always add a valid access_token to any graph api request. e.g. https://graph.facebook.com/?ids=https://www.facebook.com/groups/Happypattaya&access_token=CAACXXXXX

Michael Baird
  • 166
  • 2
  • 6
  • Thank you Michael, it seem like I have to do as this link http://stackoverflow.com/questions/19030282/get-facebook-group-id-using-identifier-or-url it works fine – Forexury Nov 12 '14 at 13:54