1665 posts
  • Has been part of the Envato Community for over 4 years
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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

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

Iz anyone here to help me. :|

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by