To pull from a facebook page, you now need a user token. This patch takes your user token and creates a permanent token for your page. And then the facebook pull block works.

Comments

ccx105 created an issue. See original summary.

swiftsystems’s picture

swiftsystems’s picture

Improved patch that stores permanent key in settings.

tiikeri’s picture

Hi ccx105, thank you for the patch!
I successfully tested the patch, but I think that the file patch is not properly configured: I recursively run into the error

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/config/install/socialfeed.facebooksettings.yml b/config/install/socialfeed.facebooksettings.yml
|index 4d5d82f..822baf5 100644
|--- a/config/install/socialfeed.facebooksettings.yml
|+++ b/config/install/socialfeed.facebooksettings.yml
--------------------------
File to patch:

I used the p0 command. This error run on every file to patch, you need to write every module file mentioned in the patch file to get it work.

Despite that, it works!
This may close https://www.drupal.org/project/socialfeed/issues/2977624 issue and all other similar and possibly related issues.

cheers

swiftsystems’s picture

Hi tiikery, you're welcome glad it was helpful. Happy to give back to such an awesome and useful module.

Ah weird that the patch didn't work. The way I applied it to test it was by running:

patch -p1 < 3018651-8.x-1.x-facebook-pull-from-page-fix-\#3.patch

in the socialfeed contrib module folder.

It worked with version 1.0-beta3.

Please let me know if it doesn't work with the above command and I will try to fix it.

Have a good one!

tiikeri’s picture

My fault: tested with patch option -p1 and everything works perfectly. Lazily I followed an old documentation for patching, it uses -p0 option, seems a more cautious way to do the same thing.

;-)

drupalfan2’s picture

Issue summary: View changes
drupalfan2’s picture

Thank you for this patch.

I installed the patch #3 and entered the Default Facebook User Token. I placed the Facebook block in my content region.

Now I am waiting: nothing happens. I can run cron a lot of times, nothing happens. There is no error message anymore.

But how can I run cron manually to start fetching the FB posts?
How can I see that the FB post are beeing fetched or not?
How often the cron job fetches to FB posts (Interval)?
Thank you.

drupalfan2’s picture

After a lot of tests I still got this error message:

Error loading Facebook feed: You must provide an access token.

Is there still a problem here?
In admin/structure/block I can configure my Facebook block. There is a checkbox "Customize feed". If I activate it I can see that there is no Default Facebook User Token field. The field is missing there. This may be the problem. Can you help?

tiikeri’s picture

I'm sorry drupalfan, but I can't see any socialfeed configurations in the block...
The only thing you need is to place your User Access Token into the /admin/config/socialfeed/facebook field.
Stupid question, but something someone should always remember: did you cr or clean your d8 cache and then run cron?
Maybe it's simply a rendering problem.
After applying the patch I just entered the token, flushed the cache, ran cron, placed the block in my region and it just popped up.

drupalfan2’s picture

Issue summary: View changes
StatusFileSize
new21.71 KB

Got to
/admin/structure/block/manage/facebookblock?destination=/admin/structure/block

then you will see the "Customize feed" checkbox: Have a look at my attached screenshot.

Now I removed the FB block, I cleared the cache, I placed the block "Facebook Block" to content region.
Nothing changed, the same behavior as before.

Sometimes I get the error "Error loading Facebook feed: You must provide an access token." in the error log.

I still do not know the intervall: How long we have to wait till next pulling of the FB posts? Or how often I have to run cron manually? There is still not hint (no documentation) how this works.

drupalfan2’s picture

Issue summary: View changes
drupalfan2’s picture

What do I have to change in the code in order to fetch/pull the Facebook posts on every (!) cron run (only for test purposes)???

sajiniantony’s picture

Getting the error Error loading Facebook feed: You must provide an access token." in the error log.any help is appreciated

yaach’s picture

Getting error as well after applying patch #3

"Error loading Facebook feed: You must provide an access token."

Any thoughts?

musa.thomas’s picture

So I put the "token client" which you can find into facebook developper site in advanced section but still get an error.
I don't know if it's the right token, or maybe what i can see the call url is on "://graph.facebook.com/v2.8/oauth/access_token" and also in facebook developper i can only select v3.2 also it's write the depreciated version are not listing

rishi.kulshreshtha’s picture

StatusFileSize
new24.58 KB

Rerolled the patch with Drupal Standards, Misc Fixes & Enchancements

hemangi.gokhale’s picture

Status: Patch (to be ported) » Fixed

Thanks for the patches @ccx105& @Rishi Kulshreshtha. Marking this issue now closed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

bsharma_1245’s picture

I am using "socialfeed_extra" plugin.
I want my facebook post to be shown on my website.
I have created an app on facebook developer account for this & requested for manage_pages permission. The permission is denied & the response said "While your screencast and notes provide a valid use case, we were unable to verify this use case when we logged into your app. Please ensure that your app has correctly integrated the requested permission, and resubmit for review so that we can complete testing."

I want to know the possible steps for this to be done successfully

hemangi.gokhale’s picture

@bsharma_1245, this is the guideline for Facebook configuration, I hope it helps!