Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » facebook connect--how to make use of makeRequest for publishing

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1267 Views
  • theoldlr
    Avatar
    Community Member
    103 Posts

    facebook connect--how to make use of makeRequest for publishing Link to this post

    I see the protected function makeRequest which seems like it could be used to publish to a friends wall, but I am not sure the proper way to access it. In my case I would like to use it from a Form's Actions function, using data submitted by the user to publish to someones wall.

    These are pretty facebook specific question here, but I'll throw it out just in case somebody knows off the cuff--
    In order to publish to a friend's wall I will also need to be granted higher permissions than the module requests by default, yes? I believe this can be done with the set_permissions function, but after setting them how do you re-request the user to authorize them?

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: facebook connect--how to make use of makeRequest for publishing Link to this post

    ll I will also need to be granted higher permissions than the module requests by default, yes? I believe this can be done with the set_permissions function

    Yes you will need to ask for permissions related to posting to the wall. Check the fb docs for more information on the available permissions

    I see the protected function makeRequest which seems like it could be used to publish to a friends wall, but I am not sure the proper way to access it. In my case

    Currently the module does not wrap any of the facebook API methods. It does however, give you access to the base Facebook API. From there you can do crazy and do your own things..

    // your controller
    $fb = $this->getFacebook();
    $fb->api('/willrossiter/feed');

    Facebook has some really nice documentation available https://developers.facebook.com/docs/reference/api/

  • theoldlr
    Avatar
    Community Member
    103 Posts

    Re: facebook connect--how to make use of makeRequest for publishing Link to this post

    Thank for the reply... I'm struggling with how to prompt for the extended permissions though. I can't make facebook JS calls such as

    Facebook.showPermissionDialog('publish_stream', ondone, false, '');

    without getting errors. Doesnt the module take care of setting that up? I'm a lost.

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: facebook connect--how to make use of makeRequest for publishing Link to this post

    You can use FacebookConnect::set_permissions($permissions) to set what permissions the module asks for. Not sure if it works but it should reask the user if your application hasn't got all the permissions required.

    1267 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.