in Facebook Graph API

In this article,  I would like to share my solution to get a Facebook group ID number from its URL.

Right now, this operation could not be done using Facebook Graph API or FQL. I have no idea why that old dated issue still not fixed by Facebook !

In this solution I have used a bot which login to Facebook, then go to the target group  and extracts group id in somewhere from the HTML content.

Here is the code source of a working solution based on PHP cURL library and DOM Xpath.

FacebookBot.php 

 GetGroupIdFromUrl.php

Try it here (Live demo) :

If  you have found  a bug or an alternative solution, please dont’t hesitate to post a comment or send me a private message. Thank you.

 

 

Write a Comment

Comment

  1. Hi admin do you need unlimited articles for your site ? What if
    you could copy article from other blogs, make it pass copyscape test and publish on your site
    – i know the right tool for you, just search in google:
    Ziakdra’s article tool

  2. Hola! Gracias por esta información. Llevaba un rato busacando
    por internet sobre este tema hasta el momento en que he encontrado tu página.

    Está muy bieen el artículo. Prosigue de esta forma!