6

How can I get the name of an app, assuming that I have the app ID and app secret to use, using the Facebook PHP SDK?

Jared
  • 2,006
  • 4
  • 23
  • 43

1 Answers1

11

https://graph.facebook.com/[APP ID]

example: https://graph.facebook.com/102452128776 :

{
   "id": "102452128776",
   "name": "FarmVille",
   "description": "Join your friends in FarmVille, the world\u2019s biggest farming game! Grow hundreds of crops, trees, and animals! More added every day",
   "category": "Games",
   "subcategory": "Simulation",
   "link": "https://www.facebook.com/apps/application.php?id=102452128776",
   "namespace": "onthefarm",
   "icon_url": "http://photos-g.ak.fbcdn.net/photos-ak-snc7/v85005/144/102452128776/app_2_102452128776_798621234.gif",
   "logo_url": "http://photos-f.ak.fbcdn.net/photos-ak-snc7/v85005/144/102452128776/app_1_102452128776_1417137715.gif",
   "company": "Zynga",
   "daily_active_users": "4200000",
   "weekly_active_users": "10000000",
   "monthly_active_users": "21400000",
   "mobile_web_url": "http://express.farmville.com/fx/"
}

In the PHP SDK, that'd be $facebook->api('/'.$APP_ID);

Igy
  • 43,710
  • 8
  • 89
  • 115
  • If you explicitly request the other fields, they're still returned, but the defaults for which fields are returned changed in 2015 with v2.4 of the API: this still works, for example: https://graph.facebook.com/102452128776?fields=id,name,description,category,subcategory,link,namespace,icon_url,logo_url,company,daily_active_users,weekly_active_users,monthly_active_users,mobile_web_url – Igy Mar 05 '19 at 12:02