Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Facebook v4a publish_actions deprecated
Started by tech26 May 02 2018 03:42 PM

- - - - -
17 replies to this topic
facebook v4a deprecated publish_actions
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

tech26

[GLOBAL: userInfoPane.html]
tech26
  • Observer

  • 1 posts
  • Corona SDK

Hi,

According to Facebook Developers review process, it states:
 

 

 

The publish_actions permission will be deprecated. This permission granted apps access to publish posts to Facebook as the logged in user. Apps created from today onwards will not have access to this permission. Apps created before today that have been previously approved to request publish_actions can continue to do so until August 1, 2018. No further apps will be approved to use publish_actions via app review. Developers currently utilizing publish_actions are encouraged to switch to Facebook's Share dialogs for webiOS and Android.

 

However the updated Facebook v4a documentation still uses the publish_actions (https://docs.coronalabs.com/plugin/facebook-v4/login.html) within the Intermediate listener.  Currently I have my Corona app to follow this code structure.  When August 1st comes around, will I have to call the login function with a different permission or will this line
"facebook.login( genericFacebookListener, { "publish_actions" } )"
be removed altogether?  Currently the way my app is set up is that it needs these two separate login function calls in order for my posting to work if a user decides to sign into their account within the Corona app or when they choose to login externally through their device Facebook app.

 

Will that login function call with the publish_actions request break the code if left in when it reaches August 1st?

 

Thank you!



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

I think the message from Facebook is rather clear. You don't need to request (and now shouldn't) publish_actions. You should switch to the facebook.showDialog() API to post on timelines and don't use facebook.request() for that feature any longer.

 

You will still need to call facebook.login() to use facebook.showDialog().

 

Rob



[TOPIC: post.html]
#3

antkmk

[GLOBAL: userInfoPane.html]
antkmk
  • Observer

  • 25 posts
  • Corona SDK

Is there an updated facebook sample app?  I've been having a nightmare of a time trying to get facebook sharing integrated into my app.  I have an app, developed with "v4" and last updated maybe a year ago that was working.  Now, I'm attempting to add facebook sharing to a second app and continue to get an "Invalid Scopes: user_friends." error from facebook as I attempt to login in.  I followed the v4a facebook sample code (and get an error even when I went through the process of setting up, building and installing that app on my iPhone).  If some commands are being deprecated, or if you can help point me in the right direction to resolve this error, it would be much appreciated!

Attached Thumbnails

  • IMG_4492.PNG


[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

The sample app that ships with the latest daily build has been updated to use the .v4a version of the plugin, however, it's still coded to look for the publish_actions permission, which Facebook is blocking in August. It should be a simple matter of just not asking for that permission, but the sample tests to see if that permission has been granted or not, and that test will also need to be removed since you can't use it any more.

 

I don't see any reference to "user_friends" in the sample app, so perhaps it's in your code or something you've setup in the Facebook developer portal.

 

Rob



[TOPIC: post.html]
#5

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

Might have to forget user_friends too.... I've had a submission pending review with Facebook for weeks now.



[TOPIC: post.html]
#6

antkmk

[GLOBAL: userInfoPane.html]
antkmk
  • Observer

  • 25 posts
  • Corona SDK

Thank you for your response.  This may be a newbie question, but can you tell me where the "user_friends" permission is requested / set?  My app requests "me/feed" and "me/photos" depending on what the user wants, but I'm not explicitly requesting "user_friends". I see where I have "facebook.login( { "publish_actions" } )". I can remove that and see what happens.  

 

The error I'm getting is right during the facebook.login() command.  I'm not even getting to the publish or requests commands.

 

I also, don't see anywhere on my facebook developer account where I'm requesting "user_friends". The only permissions I see are "default" and "email".

 

Update: I took my app's facebook account out of "Live" and moved it back to "Development" and I'm no longer getting the "user_friends" error, which is great... I wonder if I need to leave it in "Development" when I release the app update.  Currently I'm getting an error on the "facebook.request( "me/feed", "POST", messageVar )".

 

Thank you again.



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

I have asked an engineer who's going to be working on the FB plugin to investigate this.

 

Rob



[TOPIC: post.html]
#8

antkmk

[GLOBAL: userInfoPane.html]
antkmk
  • Observer

  • 25 posts
  • Corona SDK

Thank you.  One more bit of info...  I can get past the "user_friends" issue - as mentioned - by switching the facebook app account to "Development", but now the "me/feed POST" produces an error (without calling "publish_actions").  When I do perform a login requesting "publish_actions" I get the same error mentioned initially except that instead of "user_friends" it says "publish_actions".  Again, any help, or pointing in the right direction is appreciated!



[TOPIC: post.html]
#9

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

user_friends will be requested in your log in call (or you have specified it in your Facebook Developer profile).  I would check on Facebook.



[TOPIC: post.html]
#10

antkmk

[GLOBAL: userInfoPane.html]
antkmk
  • Observer

  • 25 posts
  • Corona SDK

Well, I guess I'm a step ahead of where I was yesterday, but I am unable to post to my facebook wall using "local response = facebook.request( "me/feed", "POST", { message="Hello Facebook" } )".  I think what I'm getting is a permissions error, possibly (com.facebook.sdk.share error 2).  Currently in my facebook developer account for the app I have only "email" and "default" options under approved login permissions.  I am unable to find "publish_actions" in the "Start a Submission" list.  Can anyone help me decide what permissions I should be requesting to post text and photos to my own (the app user's) facebook wall?



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

To call facebook.request("me/feed") requires the "publish_action" permission. This is a permission, that previously you could test in development with no restrictions, however before you could make your app live on Facebook, you had to submit your app to Facebook and get it approved by Facebook.  I'm not sure how restrictive Facebook was in approving apps requesting this permission, but given all the issues Facebook is facing regarding user data privacy, they have changed the rules.  If you have a new, unapproved app, they will not approve your app to have the "publish_actions" permission. If you have a previously approved app, then you will loose access to "publish_actions" on August 1, 2018.  This is not a Corona decision. This is Facebook.  See:

 

https://developers.facebook.com/blog/post/2018/04/24/new-facebook-platform-product-changes-policy-updates/

 

What this means to you is you should immediately update your app to not call facebook.request("me/feed") instead you should call facebook.showDialog() and allow Facebook to manage showing the dialog to allow the user to post the content. You cannot still fill out the text for the user. They have to type in what they want to say.

 

Rob



[TOPIC: post.html]
#12

antkmk

[GLOBAL: userInfoPane.html]
antkmk
  • Observer

  • 25 posts
  • Corona SDK

Wow!  That's lousy! - Not you, or your help with this!  But, the policy change.  To be clear, if i have an app that allows a user to enter notes and photos about a destination, they can't select that destination in the app and then have the upload pre-populated with the text and photos that they entered?

 

That may defeat the point of using facebook in my app.  Please let me know if I understand that correctly.  And thank you for taking the time to let me know.  I realize there have been a lot of changes recently with facebook!  -Keith



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

I believe you can upload photos and links, but the text has to be entered by the user and not pre-entered by the app. You can certainly try, but that's my understanding.

 

Rob



[TOPIC: post.html]
#14

antkmk

[GLOBAL: userInfoPane.html]
antkmk
  • Observer

  • 25 posts
  • Corona SDK

Thank you for the clarification Rob. I'll see what I can do and what my options are at this point!



[TOPIC: post.html]
#15

pixtor

[GLOBAL: userInfoPane.html]
pixtor
  • Observer

  • 2 posts
  • Corona SDK

Also user/scores its deprecated, what recommend now ?? .

 

How can explain your gamers /clients that Facebook change everything and now can not play, or have its score.

 

 

 



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

There are a dozen ways to do scores/leaderboards outside of Facebook. Without more details on how you're using this in your app, making alternate recommendations will be difficult. 

 

Rob



[TOPIC: post.html]
#17

infonow

[GLOBAL: userInfoPane.html]
infonow
  • Observer

  • 1 posts
  • Corona SDK

I have asked an engineer who's going to be working on the FB plugin to investigate this.

 

Rob

 Hi Rob,

 

Is the plugin investigation or any work around underway, is there any breakthrough on this. I would appreciate if you can share your . inputs.



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

Starting with build 3326 (the most recent public build), we no longer add a request for "user_friends" to the default login. It's now your responsibility to request that permission. If you build with 3326 or later you will get a version of v4a that does not include "user_friends", if you build with a version earlier than 3326 then you will get the "user_friends" permission.

 

This was announced in our Blog, which echos here and shared on social media:

 

https://coronalabs.com/blog/2018/07/10/corona-labs-releases-a-new-public-build/

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: facebook, v4a, deprecated, publish_actions