Is it possible to disable editing on Facebook\twitter post using native.showPopup("social", "facebook")?

Hey,

Like the title says, when posting to Facebook using native.showPopup(“social”, “facebook”)

I get the message pop up, but the keyboard is showing and allowing the user to edit the message to post…

Is there a way to disable editing the message?

For example “I’ve reached level 28 in this cool game” , the user can change the text of the post, so it will become meaningless.

If not, then what are the alternatives?

Roy.

I don’t know of any way to disable editing on iOS using native.showPopup.

FYI, on Android, Facebook sharing with Corona is broken. You may want to join the discussion about it here:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/

Oh dear…

Facebook specifically does not like apps to write posts for users that the users have no control over.  If you want to post pre-written tweets, then I would suggest using the twitter sample app as an example and do your own thing.  The whole reason for giving the user a dialog box is that they can change it.

As for the Android issue, as you may have noticed, we are doing two really big things with Mac and Win32.exe type apps for the community.  I know this is an important fix and I’m fighting to get the bandwidth to have it worked on.

Rob

Wait but looking at the sample app for Facebook
(EDIT: not the native.showpopup, but the Facebook library) , it’s exactly what is done there, so is it not a best practice?
And what will happen if there will be a share button in the app, that shares the user progress to the user’s wall? Will the app be rejected for this?

Roy.

AFAIK FB rejects apps that do not allow the users to change the share text. http://forums.coronalabs.com/topic/48394-facebook-publish-actions-rejected-due-to-message-being-pre-filled/

Rob, thanks! I know that your colleagues are busy. Thanks for your help in drawing attention to this. My own data show the Facebook:Twitter sharing ratio is greater than 10:1 across a universe of hundreds of thousands of samples. That’s not a typo. Facebook sharing is very important to users.

<POM>: Here’s an excerpt from the November 2014 thread about fixing Android Facebook sharing:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/

Facebook’s official position is: “Our API does not support pre-filling the message for users” https://developers.facebook.com/bugs/332619626816423/

Yes.  It is a violation of their terms of service.

Corona engineering seems/appears to have a confusing “interpretation” of this, regarding the “simple sharing” on Android.  True that FB’s ToS prohibits auto-filling text.  But also true that FB does indeed support Androids internal share intent, and from Corona (and it does work – i’ve done it myself).  It’s just that you’re not supposed to auto-fill text when using that intent.  Corona engineering seems/appears to have taken the stance that if you’re prohibited from auto-filling text (by policy), then they won’t support the share intent at all (by technology).  There’s some sort of disconnect here.

Wait…

The “Platform Policy 2.3” say that you can’t add your own text to the post, and you can’t append additional text, but what if you don’t do those?

What if you have a “Share” button, that simply… well… share an app

Is this a violation too?

See below what i mean.

Untitled-1_zpsrgzswwce.png

Roy.

<POM>: If you’re talking about sharing via native.showPopup() on Android, Facebook allows developers to share an image or URL, including a custom image or URL you generate on the fly. Non-Corona apps support this on Android, but Corona SDK-built ones do not. This is what Rob said Engineering is looking into.

The November 2014 thread discusses this at some length:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/

<corona273>:

No, I’m talking about General rules about posting to Facebook, (bit off topic but it is a conversation after all)
If using the facebook* library, creating a button that simply share the app with no additional text , like the image in green above, is this a violation?

Roy.

 Corona engineering seems/appears to have taken the stance that if you’re prohibited from auto-filling text (by policy), then they won’t support the share intent at all (by technology).  There’s some sort of disconnect here.

Dave: I think that’s the best description of Corona’s policy that I’ve read so far. 

Because Facebook prohibits auto-filled out text (by policy), Corona has chosen (by technology) to disable even the allowed sharing of URLs and images. I actually suspect there’s some Android code saying IF SHARING_INTENT_TARGET == “FACEBOOK” THEN ABORT that needs to be commented out to restore the defaults.

But I’m confused about one point. You said that “FB does indeed support Androids internal share intent, and from Corona (and it does work – i’ve done it myself).”

I just tried to share a URL (no text) and a URL and image (no text) with native.showPopup() on Android L on a Nexus 5 with the Facebook app installed and a user account logged in. Facebook is available as a sharing target from other apps. But it does not show up as one in a Corona-built app.

Can you share what you did to make this work?

Full details are here “somewhere” here on the forum (i’ve lost track), but in short:

“pretend” that you’re going to do an email share, and set up the options accordingly (my use was just to share a captured image, so didn’t care that i couldn’t prefill text for subject or body),

now, and this is the key, and is the kludgy/hokey part that prevents it from being usable in real-world applications, but does prove the concept/theory:  go into your settings-apps, find whatever app you currently have associated with the email share intent (it’s probably gmail :D), and clear out that association.

now when you attempt to share an email you’ll get the “just once/always” chooser.

so fire up your app, try to share an email, then choose facebook, just once.

and done (assuming you have the facebook app installed, of course), your pic was just posted.

now try it again, but choose twitter (assuming you have twitter app installed) just once.  and done, photo posted.

now try it again, but choose g+ just once, and done, photo posted.

now try it again, but choose ANY OTHER app you happen to have that has some reasonable chance of knowing what to do with an image file, and it probably “just works” too.

when done experimenting, select your original email client and “always” to put things back the way they were.

the point is:  if Corona allowed you to FORCE the creation of a chooser (so as to override any pre-existing association, and is literally a one-line addition if you’ve already got all the other code in place) you could issue a “generic” share intent and do “simple sharing” on android+facebook today.

I don’t know of any way to disable editing on iOS using native.showPopup.

FYI, on Android, Facebook sharing with Corona is broken. You may want to join the discussion about it here:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/

Oh dear…

Facebook specifically does not like apps to write posts for users that the users have no control over.  If you want to post pre-written tweets, then I would suggest using the twitter sample app as an example and do your own thing.  The whole reason for giving the user a dialog box is that they can change it.

As for the Android issue, as you may have noticed, we are doing two really big things with Mac and Win32.exe type apps for the community.  I know this is an important fix and I’m fighting to get the bandwidth to have it worked on.

Rob

Wait but looking at the sample app for Facebook
(EDIT: not the native.showpopup, but the Facebook library) , it’s exactly what is done there, so is it not a best practice?
And what will happen if there will be a share button in the app, that shares the user progress to the user’s wall? Will the app be rejected for this?

Roy.

AFAIK FB rejects apps that do not allow the users to change the share text. http://forums.coronalabs.com/topic/48394-facebook-publish-actions-rejected-due-to-message-being-pre-filled/

Rob, thanks! I know that your colleagues are busy. Thanks for your help in drawing attention to this. My own data show the Facebook:Twitter sharing ratio is greater than 10:1 across a universe of hundreds of thousands of samples. That’s not a typo. Facebook sharing is very important to users.

<POM>: Here’s an excerpt from the November 2014 thread about fixing Android Facebook sharing:

http://forums.coronalabs.com/topic/52755-can-corona-enable-limited-facebook-sharing-on-android-via-nativeshowpopup/

Facebook’s official position is: “Our API does not support pre-filling the message for users” https://developers.facebook.com/bugs/332619626816423/

Yes.  It is a violation of their terms of service.

Corona engineering seems/appears to have a confusing “interpretation” of this, regarding the “simple sharing” on Android.  True that FB’s ToS prohibits auto-filling text.  But also true that FB does indeed support Androids internal share intent, and from Corona (and it does work – i’ve done it myself).  It’s just that you’re not supposed to auto-fill text when using that intent.  Corona engineering seems/appears to have taken the stance that if you’re prohibited from auto-filling text (by policy), then they won’t support the share intent at all (by technology).  There’s some sort of disconnect here.