Topic-icon setup facebook channel user_group

Active Subscriptions:

None
11 years 11 months ago #44913 by gigedo
I'm unable to set up a new facebook channel. I have followed the instructions as stated in the creating a social guide, I've logged in on the front end of the site and accepted the correct permission to link my social network account to my joomla account, however this last step does not complete all the way. I kept getting the following error message.

" The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies."


www.sourcecoast.com/images/agorapro/atta...47/error-message.PNG] [/url]


As stated in the error message, I deleted the cookies and I even tried a different browser, which resulted in the same error.

It appears that the page that it's trying to access is:

eventscreole.com/index.php?option=com_jf...0a4f3fa5ea335c09#_=_
The topic has been locked.
Support Specialist
11 years 11 months ago #44926 by alzander
Sorry you're running into issues with the Channels feature. The problem comes from a change in Facebook's API that occurred on May 1st. The current release of JFBConnect doesn't fully support the change yet for apps created after that date that are also using the Channels feature to post.

To fix it now, please open the /components/com_jfbconnect/libraries/provider/facebook.php file. Around line 295, you'll see the following block of code:
public function getUserScope($uid) 
    {    
        // get current scope for the user 
        $return = array(); 
        $params['access_token'] = JFBCFactory::usermap()->getUserAccessToken($uid, 'facebook'); 
        $currentScope = $this->api('/' . $uid . '/permissions', $params, true, 'GET'); 
        if (isset($currentScope['data']) && isset($currentScope['data'][0])) 
        {    
            $currentScope = $currentScope['data'][0]; 
            foreach ($currentScope as $scope => $val) 
            {    
                if ($val == 1) 
                    $return[] = $scope; 
            }    
        }    
        return $return; 
    }
Replace that whole function with the below, which will properly detect the user's granted permissions using the older Facebook methods or the newer ones implemented in new Applications after May 1st:
public function getUserScope($uid) 
    { 
        // get current scope for the user 
        $return = array(); 
        $params['access_token'] = JFBCFactory::usermap()->getUserAccessToken($uid, 'facebook'); 
        $currentScope = $this->api('/' . $uid . '/permissions', $params, true, 'GET'); 
        if (isset($currentScope['data']) && isset($currentScope['data'][0])) 
        { 
            foreach ($currentScope['data'] as $scope) 
            { 
                // Check for v2.0 of Graph API 
                if (array_key_exists('permission', $scope)) 
                { 
                    if ($scope['status'] == 'granted') 
                        $return[] = $scope['permission']; 
                } 
                else 
                { 
                    foreach ($scope as $permission => $val) 
                    { 
                        if ($val == 1) 
                            $return[] = $permission; 
                    } 
                } 
            } 
        } 
        return $return; 
    }
That change will definitely be in the next release of JFBConnect, so you won't have to make this change again in the future.

Please let me know how that goes, and best of luck,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #44961 by gigedo
Thank you Alex for your quick reply. By following your instructions I was able to resolve the problem.
The topic has been locked.
Support Specialist
11 years 11 months ago #44967 by alzander
Glad to hear that worked, and sorry for the issue you ran into. Again, this fix will be in the 6.1 release, due out toward the end of this month.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 11 months ago #45433 by gigedo
Has something changed since the last time. I'm getting the same loop error "This webpage has a redirect loop", but for a different user that I'm trying to set up. Please advised.
The topic has been locked.
Support Specialist
11 years 11 months ago #45436 by alzander
If you haven't already, upgrade to JFBConnect v6.1. It has some minor improvements for the Facebook channels, but nothing major over the code change above.

Beyond that, are you only getting the redirect loop when you try to setup a new Group channel for that user?

If you delete the channel, does the issue go away?

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 10 months ago #45594 by gigedo
I updated to v6.1.0 as suggested. I deleted the group and created a new one, I'm still receiving the error redirect loop message "www.facebook.com/dialog/oauth?client_id=...Cpublish_actions#_=_" this happens for both groups and pages.
The topic has been locked.
Support Specialist
11 years 10 months ago #45628 by alzander
Gigi,
I'm sorry for the delays in this. I'm honestly not sure what's going on on your site, as we haven't heard of this problem from any other users.

Would it be possible for you to Private Message us admin access to your site so we can investigate further? You can PM by clicking the mail icon under my name to the left. We'll do whatever we can to help get you going.

Thanks,
Alex
The topic has been locked.