Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Likes & Comments missing #26

Open
Metis77 opened this issue Jul 8, 2020 · 10 comments
Open

Likes & Comments missing #26

Metis77 opened this issue Jul 8, 2020 · 10 comments

Comments

@Metis77
Copy link
Contributor

Metis77 commented Jul 8, 2020

since the update, data for the likes and the comments seem to be missing.
before we could use the $item['likes']['count'] and $item['comments']['count'].

Is this information still available in the new API?
Would it be possible to add them again?

@qzminski
Copy link
Member

qzminski commented Jul 9, 2020

It should be added in bfdf7b7, you can test it before I release a new version.

@Metis77
Copy link
Contributor Author

Metis77 commented Jul 9, 2020

in <?php $this->showTemplateVars(); ?> the fields comments_count and like_count are not yet available.
Cleared Cache, updated DB.

@qzminski
Copy link
Member

qzminski commented Jul 9, 2020

I noticed that the Instagram API does not contain that information but I thought it was specific to my test account. Yet I will have to further check why the data is not returned.

@qzminski
Copy link
Member

qzminski commented Jul 9, 2020

Okay it seems that for every media item a separate request is needed. However when I do that, I get an error:

Tried accessing nonexisting field (comments_count) on node type (Media)

… which could be related to the missing instagram_basic and pages_read_engagement permissions https://developers.facebook.com/docs/instagram-api/reference/media#returnable-fields

I am not able to verify my app and I don't have any other idea what could be wrong. Thus this issue will remain open until somebody can shed some light on this.

@Metis77
Copy link
Contributor Author

Metis77 commented Jul 9, 2020

I could offer my App Credentials and add your testing Domain to the app, if that would be of any help.

@qzminski
Copy link
Member

Has your app been verified by Facebook and is approved/public?

@Metis77
Copy link
Contributor Author

Metis77 commented Jul 13, 2020

Oh I see.
Sorry, my app is in devmode.

Facebook has changed what is can be read in devmode.
Metadata like likes and comments can no longer be read in devmode.

Features can be used by apps while in Development Mode, with the exception of Page Public Content Access and Page Public Metadata Access, which can only be used while in Live Mode.

Requesting live mode for every app / user that uses your plugin, might be unrealistic.

Maybe this plugin could come with its own public facebook app, that anybody could use.
Alike is discussed for another contao facebook plugin by @m-vo:
m-vo/contao-facebook-import#16

qzminski added a commit that referenced this issue Jul 14, 2020
@qzminski
Copy link
Member

If that is the case then I guess we cannot do much about it as of now. I will leave this ticket open though, maybe somebody has an idea how to solve that other way.

@fritzmg
Copy link
Contributor

fritzmg commented Jul 14, 2020

The pages_read_engagement permission is only granted with business verification, for which you may need to sign additional contracts. It might be difficult to get.

@qzminski
Copy link
Member

So this in fact could be implemented as an optional checkbox in the module settings, yet I would need a test account that has enough permissions. If anyone has a verified account, please let me know 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants