Currently hook_fboauth_field_convert_info_alter() is not included in fboauth.api.php. And a new hook called hook_fboauth_user_properties_alter() will probably go in soon. The attached patch adds an example for those hooks. The example used is converting a Facebook location property to Geofield.

Need to wait until this gets committed though: #1486984: Add hook_fboauth_properties_alter(), allowing other modules to extend mappable field types

Comments

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new2.12 KB

Thanks! I modified the example to be less specific, since I didn't want to hold up the patch. If you plan on actually using the code you've included in your patch, I'd recommend using fboauth_graph_query() instead of a raw drupal_http_request(). This version of the patch just replaces the implementation-specific example with a code comment.

milesw’s picture

Didn't even notice fboauth_graph_query(), thanks for the heads up.

Any suggestion on the best place to post a Geofield example, maybe along with an Address Field example?

quicksketch’s picture

Any suggestion on the best place to post a Geofield example, maybe along with an Address Field example?

Maybe you should work with @madmatter23 on his FBOAuth Extras module? http://drupal.org/sandbox/madmatter23/1493630

Posting your code as working modules would probably be more valuable than documented examples.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gkdreamz’s picture

Title: Document alter hooks in API documentation » i have custom code for getting friend information
Component: Documentation » Code
Assigned: Unassigned » gkdreamz
Category: task » support
Priority: Normal » Major
Status: Closed (fixed) » Active

actually i need to get friend education history and work history from facebook.i tried to custom code.i have added permission (friends_education_history,friends_work_history)in fboauth.fboauth.inc file.
i cann't get a good result i have tried lot of ways.even i cann't pass permission to facebook.now i getting user basic info only..Any help would be greatly appreciated, Thanks.

quicksketch’s picture

Title: i have custom code for getting friend information » Document alter hooks in API documentation
Component: Code » Documentation
Assigned: gkdreamz » Unassigned
Category: support » feature
Priority: Major » Normal
Status: Active » Closed (fixed)

Please don't hijack existing issues. Your question is also at #1669752: i have custom code for getting friend information