質問

I am using this to invite a friend of facebook to my app:

   function invite(id) {
        FB.ui({
          method: 'apprequests',
          message: 'mytext',
          title: 'mytitle',
          to: id, 
        }, function(response){
                if (typeof response.error_message != 'undefined') {
                    console.log(response.error_message);            
                }else{
                    if(response!=null){
                        var invitados = id.split(',');
                        for( i=0; i<invitados.length; i++){
                             $('#friend_'+invitados[i]).addClass('invited');

                        }
                    }
                }
        });
}

The problem is that I don't have ssl certificate in my server, yet (And I know this should be solved by installing it. Since facebook moved to secure login, we only need ssl to display our site in facebook's site)

And some users get a 501 error from facebook:

(net::ERR_INSECURE_RESPONSE):

Is there a way to force opening the request (maybe in _blank) in my site instead of in facebook (inside the ifame)?

役に立ちましたか?

解決

Is there a way to force opening the request (maybe in _blank) in my site instead of in facebook (inside the ifame)?

Nope.

https://developers.facebook.com/docs/requests/:

User to User Requests are only available for Canvas apps, not websites, as accepting a request will direct the user to the Canvas Page URL of the app that sent the Request.

他のヒント

Check this link Apprequests from a Website. You should be able to invoke invite request from your website. Though accepting a request will direct to the Canvas Page URL.

In canvas apps you could try to set the "display" parameter to "page" or "popup":

FB.ui({
  display: 'page',
  method: 'apprequests',
  message: 'mytext',
  title: 'mytitle',
  to: id, 
}, callback)

The different display modes are documented at the bottom of this page: http://developers.facebook.com/docs/reference/dialogs/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top