1578 posts
  • Has been part of the Envato Community for over 3 years
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
webdesignerart says

Hi Guys i have a website which ask user to login first to see website i use facebook connect feature on my website. Its works fine user can login with fb connect feature. Now the issue is I use a facebook friend inviter app its woking fine when if user did not login through fb connect just login with his existing login details. So on that time inviter shows fb connect button when user click on it the app connect to facebook and ask to authorize this app to use. After authorization app successfully installed it works fine.

but when new user login(first time fb connect) who never installed/authorized the app facebook inviter. He see the app which list his all friends but can’t invite. I debug the issue that found the is not working because user not installed / authorized the facebook inviter app in his facebook account.

So i found the bug in login flow basically when new user use fb connect to login then it connect to facebook and give authorization to login to site but user not installed the facebook inviter app in his facebook account because in login authorization pop it ask just login authorizaiton not ask facebook inviter authorization.

So how i can check if user installed/authorized my app or not. Because the facebook inviter till not work to user if he not installed app his facebook account.

So if i can get status this new user is not authorized/installed this app then i will show the installed app button.

I am doing this:
 window.fbAsyncInit = function() {
            FB.init({appId: '####', status: true, cookie: true, xfbml: true});       

            FB.getLoginStatus(function(response) {
                  if (response.session) {
                    // logged in and connected user, someone you know
                    alert('logged in');
                  } else {
                    // no user session available, someone you dont know
                    alert('not logged in');
                  }
            });
        };
        (function() {
            var e = document.createElement('script');
            e.type = 'text/javascript';
            e.src = document.location.protocol +
                '//connect.facebook.net/en_US/all.js';
            e.async = true;
            document.getElementById('fb-root').appendChild(e);
        }());

I am struggling from last 2 days but not get solution :( Maybe here some facebook app gurus who help me for this little issue.

Thanks

1578 posts
  • Has been part of the Envato Community for over 3 years
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
webdesignerart says

Iz anyone here to help me. :|

by
by
by
by
by
by