Open Metis77 opened 4 years ago
It should be added in bfdf7b7, you can test it before I release a new version.
in <?php $this->showTemplateVars(); ?>
the fields comments_count
and like_count
are not yet available.
Cleared Cache, updated DB.
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.
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.
I could offer my App Credentials and add your testing Domain to the app, if that would be of any help.
Has your app been verified by Facebook and is approved/public?
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: https://github.com/m-vo/contao-facebook-import/issues/16
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.
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.
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 🙂
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?