3

Following the tutorial on Facebook Android SDK Official Site, in the place where I set the uiHelper .onActivityResult, I realised that.. whether I post something to the web or not (even if I simply press the back button directly), "onSuccess" would be always called.

I also discovered this Android Simple Facebook library, which simplify the process a lot. However, following the tutorial, I found that no matter I succeeded with posting or not.. I ended up having "onFail" called.

I wonder what should I do now to verify if user has successfully posted the result

Update: I realised a similar question with solution is posted here

Community
  • 1
  • 1
songyy
  • 4,323
  • 6
  • 41
  • 63
  • possible duplicate of [Using share dialog in Android Facebook SDK. How to know is user actually shared or cancelled sharing activity?](http://stackoverflow.com/questions/19746067/using-share-dialog-in-android-facebook-sdk-how-to-know-is-user-actually-shared) – songyy Mar 25 '14 at 19:10
  • What is the `reason` value do you get in `onFail()`? – sromku Mar 25 '14 at 19:15
  • @sromku Wow.. you seems to be the author of library~~ I want thank you for creating such an easy to use API :) The reason I got for the onFail(): Failed with reason: Canceled by user – songyy Mar 25 '14 at 20:26
  • @sromku Hopefully you don't mind me asking a side question here.. if I want to use Facebook SDK with Fragment.. Is there anything special I should take care of..? It seems that everything there's no result being returned, following the Facebook's official SDK. – songyy Mar 25 '14 at 20:32
  • thanks :) and, please ask any question, this is the place :) see my answer below – sromku Mar 25 '14 at 20:58

1 Answers1

1

Regarding android-simple-facebook:

Few things you need to double check in your code as described here:

Regarding Fragments there is no special stuff you should take care for. Please check this sample.

You can try the sample app and see that it works for you. This is the sample app on Google Play and this is the source. The sample app includes Fragment.

Let me know if it worked for you :)

sromku
  • 4,663
  • 1
  • 36
  • 37