2017-01-09 7 views

Antwort

0

Ich habe Bild unter Verwendung von Code unten geteilt.

private void shareOnPinterest() { 
     String sharingText = "Sharing Text"; 
     String imageUrl = "Image Url"; 
     String description = "Description"; 
     String url = String.format(
       "https://www.pinterest.com/pin/create/button/?url=%s&media=%s&description=%s", 
       urlEncode(sharingText), urlEncode(imageUrl), description); 
     Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); 
     filterByPackageName(getActivity(), intent, getString("com.pinterest")); 
     startActivity(intent); 


    } else { 
     Utils.displayDialog(getActivity(), getResources().getString(R.string.error_somthing_went_wrong)); 
    } 
} 

Hoffe, das wird Ihnen helfen!

Verwandte Themen