में Instagram पर छवियों के साथ टेक्स्ट साझा करें मेरे ऐप में मैं Instagram पर एक छवि साझा कर रहा हूं। यह मेरे ऐप में अच्छी तरह से काम कर रहा है।आईओएस
मैं निम्नलिखित कोड का उपयोग कर रहा हूं।
@property (nonatomic, retain) UIDocumentInteractionController *dic;
CGRect rect = CGRectMake(0 ,0 , 0, 0);
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIGraphicsEndImageContext();
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/test.igo"];
NSURL *igImageHookFile = [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@"file://%@", jpgPath]];
// NSURL *igImageHookFile = [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@"file://%@", screenshot]];
self.dic.UTI = @"com.instagram.photo";
self.dic = [self setupControllerWithURL:igImageHookFile usingDelegate:self];
self.dic=[UIDocumentInteractionController interactionControllerWithURL:igImageHookFile];
[self.dic presentOpenInMenuFromRect: rect inView: self.view animated: YES ];
- (UIDocumentInteractionController *) setupControllerWithURL: (NSURL*) fileURL usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate {
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL: fileURL];
interactionController.delegate = interactionDelegate;
return interactionController;
}
अब मैं छवि के साथ कुछ पाठ साझा करना चाहता हूं।
जैसा कि नीचे दी गई छवि में दिखाया गया है। "एक कैप्शन लिखें" में, मुझे उदाहरण के लिए कुछ डिफ़ॉल्ट कस्टम टेक्स्ट चाहिए। "इस फोटो को साझा करो"।
मैं यह कैसे कर सकता हूं?
अग्रिम धन्यवाद ...
मैं चित्रों को शेयर करने के लिए मेरे app से Instagram खोलने हूँ संपादित और यह ठीक काम करता है।
लेकिन क्या यह संभव है कि क्या मैं जांच सकता हूं कि उपयोगकर्ता ने इसे सफलतापूर्वक साझा किया है या नहीं?
मतलब है कि जब मैं सफलतापूर्वक एक छवि साझा करता हूं तो मैं अपने डीबी में कुछ कार्रवाई करना चाहता हूं।
मैं यह कैसे कर सकता हूं?
हे, यह मेरे लिए काम नहीं कर रहा है। –
पाठ और छवि जोड़ने के लिए कोई अन्य सेटिंग्स ..? –