Comments (6)
any chance that you reproduce it?
from instagramplugin.
Can you replicate the issue using the sample application using your environment?
from instagramplugin.
Sure, i will prepare it and give a link of it
from instagramplugin.
Here's the sample cordova application that i created:
https://www.dropbox.com/s/g4c72huf8bvecyw/sample.zip?dl=0
It's including Cordova InAppBrowser plugin which is accessible from https://github.com/apache/cordova-plugin-inappbrowser and your Instagram Plugin.
You should run this on a real iphone device that have instagram application installed to reproduce the issue. Open the application and then click Open InAppBrowser button. It will open http://ajan.im/test.html url in an inappbrowser. When you click "Share on Instagram" link on that page, the error occurres.
Here's the latest debug lines when i tried it:
2016-02-11 16:52:59.607 HelloCordova[543:661599] Apache Cordova native platform version 3.6.3 is starting.
2016-02-11 16:52:59.609 HelloCordova[543:661599] Multi-tasking -> Device: YES, App: YES
2016-02-11 16:52:59.621 HelloCordova[543:661599] Unlimited access to network resources
2016-02-11 16:52:59.632 HelloCordova[543:661599]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
2016-02-11 16:53:00.452 HelloCordova[543:661599] Resetting plugins due to page load.
2016-02-11 16:53:00.874 HelloCordova[543:661599] Finished load of: file:///var/mobile/Containers/Bundle/Application/C40F7281-253C-4329-A537-232E08EAAE91/HelloCordova.app/www/index.html
2016-02-11 16:53:29.921 HelloCordova[543:661599] Setting the WebView's frame to {{0, 0}, {320, 524}}
2016-02-11 16:53:29.921 HelloCordova[543:661599] Setting the WebView's frame to {{0, 0}, {320, 568}}
2016-02-11 16:53:29.936 HelloCordova[543:661599] THREAD WARNING: ['InAppBrowser'] took '87.792236' ms. Plugin should use a background thread.
2016-02-11 16:54:42.621 HelloCordova[543:661599] webView:didFailLoadWithError - -999: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2016-02-11 16:54:42.623 HelloCordova[543:661599] THREAD WARNING: ['InAppBrowser'] took '11.537109' ms. Plugin should use a background thread.
2016-02-11 16:54:44.631 HelloCordova[543:661599] open in instagram
2016-02-11 16:54:44.675 HelloCordova[543:661599] Warning: Attempt to present <_UIDocumentActivityViewController: 0x15d8e3000> on <MainViewController: 0x15d688950> whose view is not in the window hierarchy!
2016-02-11 16:54:44.676 HelloCordova[543:661599] THREAD WARNING: ['Instagram'] took '50.194092' ms. Plugin should use a background thread.
from instagramplugin.
i just find a workaround for the problem:
`
ref.close();
setTimeout(function(){
console.log("before instagram lastUrl: " + lastUrl);
Instagram.share('insta', "", function (err) {
if (err != null && (err == "iini" || err.indexOf("No Activity found to handle Intent") != -1)){
console.log("instagram is not installed");
alert("Instagram not installed");
} else {
console.log("err on instagram share:");
console.log(err);
}
ref = cordova.InAppBrowser.open(lastUrl, '_blank', 'location=no,hardwareback=yes,toolbar=no');
//console.log("lastUrl: " + lastUrl);
});
},1000);
`
This will close the inappbrowser and open the share menu. After click on instagram button i'm opening the inappbrowser again.
But the new problem is, if i press the cancel button in share menu it will not trigger the callback function. And this cause the inappbrowser stay closed.
in this code:
`
-
(void) documentInteractionControllerDidDismissOpenInMenu: (UIDocumentInteractionController *) controller {
CDVPluginResult *result;if (self.toInstagram) {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
[self.commandDelegate sendPluginResult:result callbackId: self.callbackId];
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:2];
[self.commandDelegate sendPluginResult:result callbackId: self.callbackId];
}
}
`
this didn't trigger the callback function. How can i achieve this?
from instagramplugin.
any chance that you could test it?
from instagramplugin.
Related Issues (20)
- Share to story gives black image HOT 1
- Android App crash when launch HOT 3
- kept on getting Instagram is undefined error
- Upgrade to using cordova-clipboard plugin rather than the universal-clipboard-plugin HOT 4
- Story gives black image HOT 13
- Share video from Android HOT 3
- IOS 13: Can not select Instagram app HOT 12
- Unable to load image for FEED HOT 15
- iOS 13.6.1 Instagram share option does not work HOT 8
- [Suggestion] - Option to set share type HOT 3
- Error when sharing image to Instagram (iOS) HOT 15
- Android API 30 - Instagram not installed HOT 4
- IOS only - Error when sharing image/asset/product to the instagram story/message/post works fine for reels
- Instagram: Not able to share Multiple images HOT 1
- Plugin doesn't work on iPhone X HOT 1
- Not able to post to feed via ios(asking to select between feed & story) HOT 2
- Instagram composer not returning to app after img is shared HOT 3
- Ionic plugin wrapper causes plugin install error HOT 2
- Plugin should not reinstall cordova-plugin-clipboard if it already exists
- Plugin not working on Android 8.0 HOT 49
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagramplugin.