Share content using Intent to Facebook Lite Android -


am using following code sharing content directly facebook app,

intent shareintent = new intent(android.content.intent.action_send);         shareintent.settype("text/plain");         shareintent                 .putextra(                         android.content.intent.extra_text,                         "some text");         packagemanager pm = v.getcontext().getpackagemanager();         list<resolveinfo> activitylist = pm.queryintentactivities(                 shareintent, 0);         (final resolveinfo app : activitylist) {             if ((app.activityinfo.name).contains("facebook")) {                 final activityinfo activity = app.activityinfo;                 final componentname name = new componentname(                         activity.applicationinfo.packagename, activity.name);                 shareintent.addcategory(intent.category_launcher);                 shareintent.setflags(intent.flag_activity_new_task                         | intent.flag_activity_reset_task_if_needed);                 shareintent.setcomponent(name);                 v.getcontext().startactivity(shareintent);                 break;             }         } 

it working facebook app, facing issues facebook lite app. user installed facebook-lite not able share content, display splash screen of fb-lite app. please me out.

  intent shareintent = new intent(android.content.intent.action_send); shareintent.settype("text/plain"); shareintent.putextra(android.content.intent.extra_subject, activity.getstring(r.string.share_subject)); shareintent.putextra(android.content.intent.extra_text, "example text");      activity.startactivity(intent.createchooser(shareintent, activity.getstring(r.string.share_title))); 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -