• buchi Boggavarapu
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Facebook toolkit was published for Salesforce.  Using that toolkit its possible to connect Facebook right inside from Salesforce.  I am trying to make a Apex to Facebook API call to fetch in groups related to my facebook id using following snippet

FacebookSession fbsession= new FacebookSession(appKey,appSecret,'','');
List<IFacebookQueryResult> groups = fbsession.query('Select name, venue, gid FROM group WHERE gid IN (SELECT gid FROM group_member WHERE uid = \'11111111111\')');

It throws following error
<error_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <error_code>102</error_code> <error_msg>Session key invalid or no longer valid: </error_msg> <request_args list="true">

To my knowledge before instantiating FacebookSession Class,I need to fetch session id and set it as 4th parameter of FacebookSession constructor.Can someone guide me how to fetch session id or is there anything else i am missing .

Samples or Examples depicting salesforce-facebook connection will be really appreciated!