Android Facebook like post on my page as the current user - android

I'm trying to post a like to a picture\post in a page I manage.
I didn't request the manage_pages permissions, since I don't want to manage the page.
I'm trying to post a like action to one of the pictures in my page thorough the Android Facebook SDK, but it says that a manage_pages permissions is required.
When i'm giving that permission, the like is being posted as the Page.
Can I somehow tell the SDK to post it by the user and not by the page the user owns ?

In the API call, instead of the page access token, use the user access token to post as the user with publish_actions permission

Related

Getting "Invalid Scopes: publish_actions" error when requesting for publish_actions permission of Facebook on Android [duplicate]

I am newer to make app using facebook iOS SDK.
My app need publish_actions to publish comment to user feed.
But I could not find the publish_actions from the list at review page to add.
I check the publish_pages, but I understood this permission is not used for user feed.
How can I add publish_actions for review item?
I noticed that Facebook Permissons Reference Page(https://developers.facebook.com/docs/facebook-login/permissions) dose not have publish_actions item anymore.
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#4-24-2018:
Facebook Login
The publish_actions permission has been removed.
Facebook is making a lot of changes currently, due to the Cambridge Analytica “scandal”.
Some of the stuff that is currently disabled might return in one form or another; but this sounds like it might be final - and that publishing in the name of a user via API is simply not possible any more.
There’s also already a bug report regarding this, https://developers.facebook.com/bugs/1677448822335592/ - but the response from Facebook sounds like it might actually be gone for good.

What facebook permissions do I need if my app is using the share plugin?

I submitted my app for facebook review (publish_actions) and they come back to me with the following:
"Your app is using the Share plugin to share content to Facebook, so you don't need to submit for review. Publish_actions is only for posting through the Graph API. See our sharing docs for more info on plugins."
And they direct me to this page:
Android Sharing
However in that page it does not really tell me what permission I need to add in order for the app review process to be successful. At the moment my app just has the default permissions: email, public_profile and user_friends.
I am not sure what they really mean by "so you don't need to submit for review" Don't all the apps need to be reviewed? But to be reviewed, I need to add a permission and I do not know which one???? At the moment with the administrator login I can share a post fine but it does not work for any other user.
Please advise.
Thanks

Getting Facebook "publish_actions" permission

I have been working on a mobile application. It has some locked features. To open them, user should share the web page of my application on Facebook. I'm using share dialog to make it. I'm publishing the Facebook post's details on my web page with using graph api and postId which comes from onsuccess.
https://developers.facebook.com/docs/android/troubleshooting#faq_288512448203790 in this page Facebook says I need "publish_actions" permission to get the postId while I'm using share dialog.
But, https://developers.facebook.com/docs/facebook-login/permissions/v2.5#reference-publish_actions in this page it says "if you are using share dialog do not request this permission."
And if I use custom dialog, facebook does not accept to share my web page.
So, my question is; What should I do to get "publish_actions" permission ?
you can still get the approval, but explaining it to facebook review team and user must be aware of the hidden posting and one more thing giving incentives or forcing users to share is not permitted by facebook policies.

OAuth2 (NOT SDK) + Facebook - Not showing the permissions to user

I tried following urls and all work:
https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&display=popup&scope=%s
https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&scope=%s
https://www.facebook.com/v2.5/dialog/oauth?client_id=%s&redirect_uri=%s&scope=%s
All 3 work, the first two ones return simple token results and the last one a json result with the token in it. I just use a webview and let the user login to facebook via the webview. All works fine and my app get's access to all data in the requested scopes.
Problem
The required scopes (permissions) are not shown to the user, the user just sees a login window and if he logs in in my app, my app get's a valid token. That's it. This way facebook does not approve my app. I think, the correct login flow should be handled by facebook and if I call the oauth login urls facebook should redirect correctly and only return the token after they have asked the user if he wants to allow the required permissions.
So what am I doing wrong? Why are the permissions are not shown to the user before facebook returns the valid token?
EDIT:
Requirements: NO SDK, because I want to use a common OAuth2 flow for many social networks and cloud services, so I don't want to add the sdk for every single service...
Code
I just call the above urls and follow the redirects until I get a correct answer with an access token, that's it.
RFC 6749 requires scopes be separated by spaces, but Facebook's implementation requires scopes be separated by commas. This violation may be the root cause.

is "publish_action" permission necessary to post on facebook wall through android applicaton?

I just need to post some text and Image on the Facebook wall of my app's user.
The Facebook app registered in developers.facebook.com doesn't have "publish_actions" permission by default. I already have submitted request for this permission but its taking long to get approved.
Meanwhile seeing my friend doing this post operation thorugh ios app without this "publish_action" permission I am curious do i need this permission to post some text and image on users wall at all? Please help me..
You dont, if you are using open graph:
Reference: The Share dialog lets people publish stories from your app without Facebook Login or the publish_actions permission. However you still have to send your app for review.
The best part is that a user can tag people in a post built upon graph API. As a sample app I would suggest you check how Scrumptious works, it comes prepackaged in the FB SDK.
You can check this link: Android: How to share image with text on facebook via intent?
Use intent sharing for normal text and image post
Publishing
You can publish posts by using the /{user-id}/feed, /{page-id}/feed,
/{event-id}/feed, or /{group-id}/feed edges.
When creating a Post for a Page if you use a user access token the
post will be in the voice of the user that posted it. If you use a
page access token, the post will be in the voice of the page.
Source.
Upload Photos to a User's Profile
This example covers uploading a photo to the current User's profile
using the Graph API and the Facebook SDK for PHP.
It assumes that you've already set your default app id and secret, and
acquired a FacebookSession using an access token or one of the login
helper classes found here. You must have requested the publish_actions
scope when logging in the user for this to work.
For more information, see the documentation for GraphObject,
FacebookRequest, and FacebookRequestException.
Source.
As you can see, you need the publish_actions privilege to post to wall a post with picture and text. You need a review as well.

Categories

Resources