我如何在新 Post 模式下打开 Instagram?
How i open Instagram in New Post mode?
恕我直言,我对 Instagram 并不熟悉 API。
但我想像我说的那样以新 post 模式打开 instagram。
例如:我想知道 Instagram 下载器。
喜欢instadownload。
他们如何以新 post 模式打开 Instagram?
我想了解 Web 应用程序和 Android 应用程序。
所以我想用 OpenDialog 创建一个页面,选择一张图片,然后重定向到 Instagram 并进入新 Post 模式。
你能帮我解决这个问题吗?
来自 Instagram docs:
String type = "image/*";
String filename = "/myPhoto.jpg";
String mediaPath = Environment.getExternalStorageDirectory() + filename;
createInstagramIntent(type, mediaPath);
private void createInstagramIntent(String type, String mediaPath){
// Create the new Intent using the 'Send' action.
Intent share = new Intent(Intent.ACTION_SEND);
// Set the MIME type
share.setType(type);
// Create the URI from the media
File media = new File(mediaPath);
Uri uri = Uri.fromFile(media);
// Add the URI to the Intent.
share.putExtra(Intent.EXTRA_STREAM, uri);
// Broadcast the Intent.
startActivity(Intent.createChooser(share, "Share to"));
}
恕我直言,我对 Instagram 并不熟悉 API。
但我想像我说的那样以新 post 模式打开 instagram。
例如:我想知道 Instagram 下载器。
喜欢instadownload。 他们如何以新 post 模式打开 Instagram? 我想了解 Web 应用程序和 Android 应用程序。 所以我想用 OpenDialog 创建一个页面,选择一张图片,然后重定向到 Instagram 并进入新 Post 模式。 你能帮我解决这个问题吗?
来自 Instagram docs:
String type = "image/*";
String filename = "/myPhoto.jpg";
String mediaPath = Environment.getExternalStorageDirectory() + filename;
createInstagramIntent(type, mediaPath);
private void createInstagramIntent(String type, String mediaPath){
// Create the new Intent using the 'Send' action.
Intent share = new Intent(Intent.ACTION_SEND);
// Set the MIME type
share.setType(type);
// Create the URI from the media
File media = new File(mediaPath);
Uri uri = Uri.fromFile(media);
// Add the URI to the Intent.
share.putExtra(Intent.EXTRA_STREAM, uri);
// Broadcast the Intent.
startActivity(Intent.createChooser(share, "Share to"));
}