Intent shareIntent=null;
	        	    shareIntent = new Intent(android.content.Intent.ACTION_SEND);
	        	    shareIntent.setType("text/plain");
	        	    shareIntent.putExtra(android.content.Intent.EXTRA_TEXT,"Paylaşım yapılacak metin buraya yazılacak");
	        	    pm = v.getContext().getPackageManager();
	        	    activityList = pm.queryIntentActivities(shareIntent, 0);
	        	    for (final ResolveInfo app : activityList) {
	        	      String aaa=app.activityInfo.name;
	        	    	if ("com.facebook.katana.activity.composer.ImplicitShareIntentHandler".equals(app.activityInfo.name)) {
	        	        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;
	        	      }
	        	    }

Yazar : Emrah Kahraman

Bilgisayar Mühendisi

Android Facebook Paylaş Kodu (Android Share to Facebook) Yazısı için Yorum Yapabilirsiniz

Kan Bağışı
Sponsor
Alexa
Hakkımda
Bağlantılar