android - Update Facebook status without the SDK -


Okay, I'm losing too much hair on this .. just so!

My app has a button that will call the Facebook app to update my status. I do not want to do this in my app, I want to do it in the Facebook app! I believe that SDK is not needed for it, right?

So I found that the way an intent is being used, such as sending an SMS or sending it by Gmail. >

  Public static zero through activity (activity activity, string subject, string text) {intent smsIntent = new intent (intent.ACTION_VIEW); SmsIntent.setType ("vnd.android-directory / MMS-SMS"); SmsIntent.putExtra ("sms_body", text); Try {Activity.startActivity (smsIntent); } Grip (ActivityNotFoundException ex) {// handle error}} Public Static Zero (activity activity, string subject, string text) via Gmail {intent gmailIntent = new intent (intent.ACTION_VIEW); GmailIntent.setClassName ("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail"); GmailIntent.putExtra (android.content.Intent.EXTRA_SUBJECT, subject); GmailIntent.putExtra (android.content.Intent.EXTRA_TEXT, lesson); Try {Activity.startActivity (gmailIntent); } Hold (ActivityNotFoundException ex) {// Handle error}} However, I'm not managing to do it with Facebook. I'm not getting the right category name and extra.  

I have already successfully launched the Facebook app, but I want to go straight to the 'Update Status Form' .. Public stabilized via Facebook (zero) Activity activity, string subject, string text) {intent facebookIntent = new intent (Intent.CATEG ORY_LAUNCHER); FacebookIntent.setClassName ("com.facebook.katana", "com.facebook.katana.LoginActivity"); Try {Activity.startActivity (facebookIntent); } Hold (ActivityNotFoundException ex) {// handle error}}


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -