× Joomla Facebook Connect support forum

Topic-icon Additional permissions

Active Subscriptions:

None
15 years 4 weeks ago #10013 by moovedk
Hi,
Just one quick question :) How can I get the additional permissions, which I have defined in the Permissions tab under Configuration.
It says "This should only be used for custom development.", but can you give a quick hint how I can get fx user_location from Facebook in my component?
Thanks :)
The topic has been locked.
Support Specialist
15 years 4 weeks ago #10018 by alzander
Replied by alzander on topic Additional permissions
Sure.. we need better developer documentation.. it's on the radar, but just not there yet.

Once you've obtained the permission from the user, the below request should return their location:
require_once JPATH_SITE.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php';
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
$location = $jfbcLibrary->api('/me/location');

You can check if this user is logged in through Facebook first with:
if ($jfbcLibrary->getUserId())

And you can see all the fields that can be fetched through the /me API call on the Facebook page below (with permissions required for each). You can also just do /me/ above and get all the information you can in a big array:
developers.facebook.com/docs/reference/api/user/

Hope that helps, but let us know if you need more info, or run into issues!
The topic has been locked.
Active Subscriptions:

None
15 years 3 weeks ago #10115 by moovedk
Replied by moovedk on topic Additional permissions
Thank you! :)
Looking forward to the developer documentation.
The topic has been locked.
Support Specialist
15 years 3 weeks ago #10126 by alzander
Replied by alzander on topic Additional permissions
We're looking forward to having it! We just moved our main product page from joomla-facebook.com to www.sourcecoast.com/joomla-facebook/ We'll be moving the config guide, changelog, demos, and a lot of other material there as a general repository of information in the future, including a dev guide. It's the start of consolidating what's been steadily expanding (and getting out of control) for JFBConnect :)

Hope the above code-snippet helped in the meantime!
The topic has been locked.