Topic-icon Limited list of facebook page(s) in the JFBConnect: Social Channels

Active Subscriptions:

None
Dear JFB,
I wanted to add a new social channel to post articles on the facebook page wall, but it seems that the list of pages is limited (?)
I have almost 30 pages managed by my profile, and not all are available via "JFBConnect: Social Channels". It looks like that the last posions from my facebook pages are not available in the JFB. I checked configurations my facebook pages and it seems that they are OK.
Do you have any suggestions what to do?

Thank you in advance!
Best,
Kalixo
The topic has been locked.
Support Specialist
I'm not aware of a limit to the amount of pages/groups/etc returned from Facebook. There's nothing in our code to limit what we display. Could you try to use the FB Graph API Explorer with the following request:
/me/accounts

Are all of the Pages visible when you Submit? This is the API call we use in JFBConnect. It will return the list of pages that you are an admin for. If there's a discrepancy (e.g. all the pages show in FB but not JFBConnect), that will shed some light on the problem.

-Melissa
The topic has been locked.
Active Subscriptions:

None
Dear Mel,
thank you for handling my ticket. It seems that your app is working correctly. I can't see the page via API too. I reported the problem to the facebook devs - probably there is some setting missing. I will keep you posted.
Thank you,
Kalixo
The topic has been locked.
Support Specialist
Could you let me know a link to the FB bug report? I'd like to subscribe in case there's anything we need to be doing differently/better.

-Melissa
The topic has been locked.
Active Subscriptions:

None
Dearr Mel,
I was answered that:

me/accounts?fields=id&limit=100 returns your page XXXXXX as expected.

and when I submit "me/accounts?limit=100" I see pages that were not visible before.

Could you please guide me where shoud I add the parameter "?limit=100" to get my pages listed in your extension?

Best,
Kalixo
The topic has been locked.
Support Specialist
There are two calls to the accounts endpoint:

1. In /components/com_jfbconnect/libraries/provider/facebook/channels/fields/facebookpagelist.php at line 28. Change
$pages = JFBCFactory::provider('facebook')->api('/' . $uid . '/accounts/', $params, true, 'GET');
to
$pages = JFBCFactory::provider('facebook')->api('/' . $uid . '/accounts?limit=100', $params, true, 'GET');

2. In /components/com_jfbconnect/libraries/provider/facebook/channel/page.php at line 32. Change
$accounts = $this->provider->api($uid . '/accounts', $params, true, 'GET');
to
$accounts = $this->provider->api($uid . '/accounts?limit=100', $params, true, 'GET');

Let us know if this works to resolve your problem. I will add a ticket to our tracker to check this in for the next release.

-Melissa
The topic has been locked.
Support Specialist
The limit can be added in the /components/com_jfbconnect/librarires/provider/facebook/channel/page.php file. Around line 32, you'll see:
$accounts = $this->provider->api($uid . '/accounts', $params, true, 'GET');]
Right above that, please try adding:
$params['limit'] = 100;
When done, it should look like:
$params = array();
        $params['access_token'] = JFBCFactory::usermap()->getUserAccessToken($jid, 'facebook');
        $params['limit'] = 100;
        $accounts = $this->provider->api($uid . '/accounts', $params, true, 'GET');
I hope that helps, but if not, let us know!

Thanks,
Alex
The topic has been locked.
Support Specialist
So.. yeah, we cross posted. Melissa's answer is probably better :) Start there!

Sorry for the confusion, but hopefully hers gets you going. It covers more cases than I thought through.
The topic has been locked.
Active Subscriptions:

None
Dear Mel and Alex,
thank you for helping with this issue.
After adding this lines everything works perfectly. Will you add those changes in the next release?
Best,
Kalixo
The topic has been locked.
Support Specialist
Yep! I've checked in the change for the next release. I'll just have to run it through my automated test suite to make sure nothing breaks.

-Melissa
The topic has been locked.