Is there a "fb" way of adding the following? Also, is there a fb "standard" way of doing the callback? (Yes, I can just add an item in hook_menu and add an ajax call but this seems dirty.)

drupal_add_js("
  function sendRequestToManyRecipients() {
      FB.init({
        appId  : '<myappid>',
        status : true,
        cookie : true,
        oauth: true
      });
        FB.ui({method: 'apprequests',
          message: 'Invite your friends to join',
          filters: ['app_non_users'],
          data: '". $user->uid . "'
        }, requestCallback);
      }
       function requestCallback(response) {
  
      }
      ",
         array('type' => 'inline', 'scope' => 'header', 'weight' => 5)
       );
      $renderarray['fb_invite'] = array(
      	'#type' => 'markup',
      	'#markup' => '<p> <input type="button" onclick="sendRequestToManyRecipients(); return false;" value="Invite your facebook friends" />
    		</p>', 
      );

Comments

13rac1’s picture

Status: Active » Closed (won't fix)

Read the README.txt