Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Released] iOS native social networking

Discussion in 'Assets and Asset Store' started by cbaltzer, Sep 21, 2013.

  1. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Provides a super easy interface to the iOS UIActivity sharing mechanism. Allows you to share text, URLs, and files. The menu is automatically generated based on what you provide.

    Compatible with iOS 6 and higher. Requires Xcode 6 to build.

    Gives you access to:
    - Facebook
    - Twitter
    - Instagram
    - Pinterest
    - Tumblr
    - Email
    - Messages
    - Camera Roll (for photos)
    ..and more!

    Diffusion supports iOS 8 Extensions and will automatically include any extensions the user has installed on their device. There is also a simple interface for adding your own custom UIActivities for whatever platforms you may want to support!

    Setup and configuration are super easy. You can set which platforms you want to allow through the inspector, as well as set up your default messages. After that, it's just a single line of code (or a SendMessage) to start sharing your content.

    Documentation is available online: http://scarlet.io/docs/diffusion.html

    [ Get it on the Asset Store! ]


    -- Screenshots --

    2 - share.png 3 - facebook.png 4 - pinterest.png 1 - editor.png


    -- Release Notes --

    2.1.0
    - Supports iOS 8 and Extensions
    - Added PostToFacebook() and PostToTwitter() methods

    2.0.2
    - Made the post-processor a little more robust
    - Fixed AirPlay never hiding

    2.0.1
    - Fixed a bug in the post-processor

    2.0.0
    - Fixed the Twitter availability check
    - Fixed custom platforms being added multiple times when entering a scene repeatedly
    - Moved to a new post-processor. See the upgrade notes.

    1.5.1
    - Added methods to check if Twitter/Facebook are logged in
    - Added support for arbitrary UIActivities
     
    Last edited: Oct 10, 2014
  2. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    1.5.1

    Added two new methods:
    isFacebookConnected() - Checks if the user is logged into Facebook
    isTwitterConnected() - Same, but for Twitter

    Added a new system for adding custom UIActivities to the menu. The process to add it to the menu is very easy:
    - Find/write your UIActivity and put all the related files in Plugins/iOS/
    - Write a small Objective-C category file to make the headers available (there's a template for this included you just need to fill in the blanks!)
    - Add the name of your UIActivity class into a slot in the inspector!

    I'll be releasing pre-made UIActivities for different things soon, and as free extensions. Instagram is coming soon, but in the mean time DMActivityInstagram works perfectly fine!
     
  3. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Apparently when I got the email saying my update had been approved for the Asset Store, it completely lied to me. The update never actually went live. I contacted the Asset Store team twice about it, but have heard nothing. I've resubmitted my update, and it's now pending approval, again.

    My apologies to anyone who has been looking for these new features. I'll update this again if I hear anything new.
     
  4. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Just going to bump this again because the latest version is now actually available. I didn't get any notice about it, so I'm not sure how long it's been live, but it's there now!

    Also, I've uploaded a free/open source extension to add Instagram support. I'll be adding more networks soon!

    Download it here: https://github.com/scarlet/Diffusion-Instagram/releases
     
  5. Electrik_Sheep

    Electrik_Sheep

    Joined:
    Sep 15, 2013
    Posts:
    15
    Hey there,

    So I found the tiniest bug in your plugin.
    On iOS when you turn Guided Access on and off you loose
    [UIApplication sharedApplication].keyWindow becomes nil so it doesn't bring up the sharing Menu anymore.

    Here is my quick fix (in Diffusion.mm ) before displaying the viewController
    At the end of : -(void)share:(NSString*)message withURL:(NSString*)url andFile:(NSString*)file

    Code (csharp):
    1.  
    2. UIWindow *window = [UIApplication sharedApplication].keyWindow;
    3. if( window == nil ){
    4.         NSArray *windows = [[UIApplication sharedApplication] windows];
    5.         if ([windows count]) {
    6.             window = windows[0];
    7.         }
    8.         else return ;
    9.     }
    10. [window.rootViewController presentViewController:activityVC animated:YES completion:nil];
    11.  
    If you think of a better way to get the window, let me know ;)
     
  6. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    We released version 2.0.0 last night! It contains several bug fixes, and new, more simple post-processor.

    Please be sure to read the upgrade notes if you're upgrading from 1.x.


    Also, this version was in the queue before we saw Electrik_Sheep's bug posted above. We'll include that fix soon! (And thanks, by the way!)
     
  7. Electrik_Sheep

    Electrik_Sheep

    Joined:
    Sep 15, 2013
    Posts:
    15
    Okay, so I was wondering,

    Since iOS7 doesn't let you share on Facebook if you are logged in the iOS settings,
    Is there a way we could still share via the Facebook App (of course if it is present on the device),and add it to share menu like you did for the Instagram app ?

    Cheers
     
  8. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    It's possible, but you'd need to also include the Facebook SDK, as I don't see a way to post through their URL schemes. You'd need to go through the standard Facebook authentication process before being able to post. Not too big of a deal with single sign on, but still a consideration.
     
  9. Electrik_Sheep

    Electrik_Sheep

    Joined:
    Sep 15, 2013
    Posts:
    15
    So, I really REALLY don't like the fact that facebook doesn't show if you are not signed in.

    What I did was to create 2 new Custom activities that use the iOS SLComposeViewController, the main difference from the UIActivity is that when you try to use it, it will tell you that you can't and guide you to your iOS settings.

    If facebook and/or twitter are not setup, they will appear in the bottom line of the UIActivity like the Instagram icon. And if they are properly setup they will remain hidden.

    I zipped the classes I created, feel free to add them to Diffusion, I feel like I wouldn't be the only one that could profit from it.

    View attachment $Plugins.zip
    $IMG_0179.PNG $IMG_0180.PNG $IMG_0181.PNG
     
    Last edited: Mar 3, 2014
  10. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
  11. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
  12. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    We've added two new free extensions for Tumblr, and Pinterest! You can get them (and our older Instagram extension) here:

    - Instagram
    - Tumblr
    - Pinterest
     
  13. lawer

    lawer

    Joined:
    Apr 10, 2014
    Posts:
    3
    thx Electrik_Sheep for your zip. I think that this zip should be add to Diffusion!
     
  14. Electrik_Sheep

    Electrik_Sheep

    Joined:
    Sep 15, 2013
    Posts:
    15
    No worries, I am glad it was useful to someone else.
     
  15. Akiles

    Akiles

    Joined:
    May 31, 2013
    Posts:
    3
    Hi cbaltzer,
    I've just installed the package but I can only see the Twitter icon in the sharing menu I'm currently logged in Facebook and Instagram, there is something else I should do to see the fb and Instagram icon?

    Thanks!
     

    Attached Files:

  16. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    For Instagram, you'll need to install the Diffusion-Instagram package, and add 'DInstagram' to the list of custom platforms.

    For Facebook you unfortunately need to be logged in through the Settings app, not just the Facebook app. See Electrik_Sheep's solution above for a slight workaround to this.
     
  17. Akiles

    Akiles

    Joined:
    May 31, 2013
    Posts:
    3
    Hi Again,
    thanks for that, it works now.
    Now I'm trying to make the ScarletPostProcessor works but it doesn't seems to do what I expected, the code is being executed but the value in the of "Enable Modules (C and Objective-C)" in the xcode project is still "NO", Im using Unity 4.01 (cant switch over to 4.3 at the moment) and everything is working fine, there is something else I should do to have the Enable Modules (C and Objective-C) activated?
    Thanks Again!
     
  18. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Hmm.. that's strange. What version of Xcode are you using? Are you seeing the log message from the PostProcessor get printed out in Unity? Make sure you're using the latest version of the PostProcessor, from here: https://github.com/scarlet/ScarletPostProcessor

    You can always set Enabled Modules to YES in Xcode itself. It sucks to do manually, but, the setting should stick as long as you append your builds.

    Edit:

    Code (csharp):
    1.  
    2. [PostProcessBuild(1500)]
    3.  
    Also, consider trying to change the line above, in ScarletPostProcessor.cs. That number indicates the order of PostProcessBuild scripts, so if you have another plugin, it could be overwriting the changes made by ScarletPostProcessor. Changing that number to something higher will cause it to run later, and hopefully after whatever other plugin is interfering.
     
    Last edited: Jun 2, 2014
  19. Akiles

    Akiles

    Joined:
    May 31, 2013
    Posts:
    3
    Thanks for the answer,
    I'm using xcode version 5.1.1

    I m seeing the log message and I change the value of the postprocessbuild but no luck :(
     
  20. paala

    paala

    Joined:
    Mar 24, 2014
    Posts:
    20
    Hi,
    Is there a way to share a custom message via script.
    I mean only a text , composed by blabla +score, and a link?
     
  21. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Yes, you can use:

    Code (csharp):
    1.  
    2. Share(string message, string url, string filePath); // filePath can be null or ""
    3.  
    You can check out the full docs here if you'd like: http://scarlet.io/diffusion
     
  22. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
  23. WPCJack

    WPCJack

    Joined:
    Mar 15, 2013
    Posts:
    26
    Hey guys,

    Looking at using this on an upcoming project, I just wanted to check does the plugin play nicely with prime31?

    Cheers
     
  24. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Yep, should integrate just fine!
     
  25. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    Hi! Is there a way to set the platforms to hide programatically? in Diffusion.cs it is an int

    EDIT: I've found a workaround for now: set the values through the inspector, then find out the number using Debug.Log, then use that number in your code later on
     
    Last edited: Sep 30, 2014
  26. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    New questions:

    1. is it possible to open the Facebook and Twitter share dialogs directly without the initial "select platform" screen?

    2. is it possible to open Facebook / twitter login dialogs while in Unity? Currently if a platform is not logged in to I'm stuck with saying "please log into Facebook in the iPhone settings" which isn't very nice
     
    Last edited: Sep 30, 2014
  27. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    The platforms are defined in DiffusionPlatforms.cs, but you can just add (or bitwise-and) them together to combine them:

    Code (csharp):
    1.  
    2. int hideFBAndTwitter = DiffusionPlatform.Facebook & DiffusionPlatform.Twitter;
    3. diffusionInstance.Share(message, url, file, hideFBAndTwitter);
    4.  

    1. No, not at this time.

    2. Also no, unless you use a solution like the one Electrik_Sheep posted above. Sorry about that!
     
  28. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    Thanks cbaltzer! That is indeed a neater solution :)

    Feature request: Is it possible to have an option for the plugin, that when you click the "copy" button you copy only the URL (not the text + url). something like:
    diffusion.copyOnlyUrlToClipboard = true;
     
  29. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    mm, added all of the files to plugins/iOS, but now if I click on Facebook when Facebook is not logged in it opens up an empty selection screen - am I missing something?
     
  30. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    Hi! I'm getting an issue with the Facebook events- I need to track if the user was able to post to Facebook.
    Diffusion offers "OnCompleted" and "OnCancelled".
    After clicking post in the app, the "OnCompleted" event is fired, thus rewarding the player for posting to Facebook. However, soon after I get an Error "Cannot Post to Facebook - the post cannot be sent because the connection to Facebook Failed".
    Please provide an "OnFailed" event and make sure that failed events do not activate the "OnCompleted" event

    What is VERY weird is that this issue occurs only if I use the custom mask to display only the Facebook option - when all of the options are displayed the Facebook post is posted without any issues. the code parts I've experimented with are:

    Code (csharp):
    1.  
    2. private const int _maskShowFacebook = -3;
    3. OR
    4. private const int _maskShowFacebook = (int)DiffusionPlatform.AirDrop & (int)DiffusionPlatform.AssignToContact & (int)DiffusionPlatform.Copy & (int)DiffusionPlatform.Custom & (int)DiffusionPlatform.Flickr & (int)DiffusionPlatform.Mail & (int)DiffusionPlatform.Message & (int)DiffusionPlatform.Print & (int)DiffusionPlatform.ReadingList & (int)DiffusionPlatform.SaveToCameraRoll & (int)DiffusionPlatform.TencentWeibo & (int)DiffusionPlatform.Twitter & (int)DiffusionPlatform.Vimeo & (int)DiffusionPlatform.Weibo;// -3
    5.  
    6. void Start ()
    7. {
    8.        //diffusionAllShareTypes.eventReceiver = gameObject;
    9.        diffusion.eventReceiver = gameObject;
    10. }
    11.  
    12. public void OnButtonShareFacebook()
    13. {
    14.  
    15.        if(!DeviceInfo.IsConnectedToTheInternet())
    16.        {
    17.                 DeviceNotifications.DisplayNoInternet();
    18.                 return;
    19.        }
    20.        if(Diffusion.isFacebookConnected())
    21.        {
    22.                 diffusion.platformsToHide = _maskShowTwitterFacebook;
    23.                 string  description = GetShareString();
    24.                 diffusion.message = description;
    25.  
    26.                   diffusion.Share();
    27.  
    28.        }
    29.        else
    30.          DeviceNotifications.DisplayMessage("Please login to Facebook in your device               settings");
    31.  
    32.  }
    33.  
     
    Last edited: Oct 7, 2014
  31. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    I'm not really sure about this. It's not my code, and is pretty old. It's possible that it just doesn't work anymore. Sorry!

    Unfortunately, I can do neither of these things. Once the share menu is presented, iOS takes control. It's not possible to modify the system share screens. OnCompleted and OnCancelled are called based on whether the share menu completion handler returns true/false. Really, OnCancelled should be fired if the post fails, but again, that's an iOS internal issue.

    I can't explain why posting would fail if Facebook is the only thing visible though! That makes no sense at all. The latest version (pending Asset Store review currently) has individual PostToFacebook() and PostToTwitter() options, which sounds like they might be more along the lines of what you need. Email your invoice number to support@scarlet.io and I'll send you a copy.
     
  32. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Since it gets asked about so frequently, I've created a custom UIActivity similar to the one Electrik_Sheep posted. It shows a Facebook icon when the user is not logged in, and gives them the same prompt that the Photos app does if they're not logged in. It will redirect them to the Settings app where they can log into Facebook.

    Note this only works on iOS 8 (will hide itself on 7 and lower), and requires Xcode 6 to build.

    You can get it here: https://github.com/scarlet/Diffusion-FBLogin/releases/latest
     
  33. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    Version 2.1.0 is now out, with iOS 8 compatibility, including support for Extensions! We've also added methods for posting directly to Facebook and Twitter without the full sharing menu.

    Get it here: http://u3d.as/5te
     
  34. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    Hi! Thanks for your fast work! I updated the plugin and am now using the direct twitter/facebook posting functionality - I do not have iOS 8 at this time - do I need too add the stuff from the github page or is it all included in the latest asset store update?

    Okay - I added everything but in Xcode I'm getting these errors:

    projectName/Libraries/Diffusion.m:230:9: Use of undeclared identifier 'UIPopoverPresentationController'
    projectName/Libraries/Diffusion.m:230:42: Use of undeclared identifier 'presentationController'; did you mean 'UINavigationController'?
    projectName/Libraries/Diffusion.m:234:9: Unknown type name 'presentationController'; did you mean 'UINavigationController'?

    projectName/Libraries/DFBLogin.m:62:33: Use of undeclared identifier 'UIAlertController'
    projectName/Libraries/DFBLogin.m:62:24: Use of undeclared identifier 'alert'
    projectName/Libraries/DFBLogin.m:66:32: Use of undeclared identifier 'UIAlertAction'
    projectName/Libraries/DFBLogin.m:66:20: Use of undeclared identifier 'settings'
    projectName/Libraries/DFBLogin.m:73:30: Use of undeclared identifier 'UIAlertAction'

    Currently I'm using Unity3D 4.3 and Xcode 5.0.2 - is this the issue? To what versions should I update?

    EDIT: Okay, I've updated to Xcode 6.0.1 and the latest Unity3D - I am now able to build once more. However, some things that used to work are now broken (testing on iOS 6, iPhone 4s):

    1. the "description" field no longer works for sharing to Facebook (it is empty) - all other platforms seem to work
     
    Last edited: Oct 13, 2014
  35. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    This is to comply with the Facebook Platform Policy (section 2.3). If you want to override this, you can comment out the if block on line 315 of Diffusion.m (make that method just return self.shareText).
     
  36. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,116
    thanks! it works!
     
  37. retox

    retox

    Joined:
    Sep 12, 2012
    Posts:
    29
    Hello, For Diffision once I've added the custom platforms, just need clarification as to what I add as the Event receiver?
     
  38. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    You don't need to add one, it's only necessary if you want the OnCompleted() and OnCancelled() callbacks. You can point it to any GameObject that has a script to handle those events.

    Edit: Also, OnCompleted won't pass back specifics for custom platforms.
     
  39. retox

    retox

    Joined:
    Sep 12, 2012
    Posts:
    29
    Thanks cbaltzer - just wanted to check I wasn't missing something.
     
  40. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    I would like to using Electrik_Sheep or cbaltzer Diffusion-FBLogin Plugin, but it doesn't work :(.

    I testing with iPhone 4s, iOS 8.1.2, XCode 6.2, Unity 4.6.3f1, Diffusion 2.1.0
    and I can't see the Facebook Icon for Facebook Login, If Facebook are not setup.

    I added your Plugin only, without settings in Unity or XCode.
     
  41. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    You must add the platform name to the Diffusion prefab in your scene, under Custom Platforms. In this case "DFBLogin".
     
  42. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    Ah, ok! Thank you!

    But the Settings-Button go to the App settings, not to the Facebook settings, why?
    Can I localize the dialog and Button text?
     
  43. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    There's no way (that I know of) to link to a specific Settings page, only to the Settings app itself. You can try different values for the URL on line 68 of DFBLogin.m, but I had no success.
    http://stackoverflow.com/questions/4496813/call-the-official-settings-app-from-my-app-on-iphone

    You can, but you'll need to modify the source. Line 62 of DFBLogin.m is where you need to start changing things. You can either change them straight in the file, or wrap them in NSLocalizedString. See:
    http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014
    http://www.objc.io/issue-9/string-localization.html
     
  44. Marwa-hamed

    Marwa-hamed

    Joined:
    Apr 12, 2015
    Posts:
    1
    Hello ,
    Thank you for the great plug in ,
    I am integrating the plug in in my project for iOS in a bid to share a screen shot of part of the users screen to all capable apps that can receive image contents.
    On my test device i am not able to get the Image portion of the message to share ,only the textual part.
    I am receiving successful feedback on my even receiver,
    the following is how my code is implemented:
    //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    publicIEnumeratorShareScreenshot()
    {


    yieldreturnnewWaitForEndOfFrame();

    Texture2DscreenTexture = newTexture2D(Mathf.RoundToInt(Screen.width*0.8f), Mathf.RoundToInt(Screen.height*0.8f),TextureFormat.RGB24,true); //create the texture.


    screenTexture.ReadPixels(newRect((int) Screen.width*0.1f, (int) Screen.height*0.1f,(int) Screen.width*0.8f,(int) Screen.height*0.8f),0,0); // read the pixels.


    screenTexture.Apply();


    byte[] dataToSave = screenTexture.EncodeToPNG(); //convert to PNG

    stringdestination = Path.Combine(Application.persistentDataPath,System.DateTime.Now.ToString("yyyy-MM-dd-HHmmss") + ".png”); //Set the destination.

    File.WriteAllBytes(destination, dataToSave);//save to destination.

    diffusion.Share("Check out my High Score!", destination); // share via diffusion.


    }
    //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    since i am already receiving the destination path with one prefixed forward slash ; I tried removing one from the "filePath = AddPrefix("file:/", filePath);”

    the following is an example result message after sharing in the editor console:

    [Diffusion] Sharing message: Check out my High Score! | | file://Users/mohamedomar/Library/ApplicationSupport/Marwan/Asteroidz/2015-07-21-084257.png

    your assitance is highly appreciated if you have a hint.
    Thanks!
     
  45. aaronflippo

    aaronflippo

    Joined:
    Jun 7, 2012
    Posts:
    43
    Hey there!
    Loving the plugin, and wanted to ask about an issue I'm seeing, in Unity 5.1.1, and iOS 8.4.

    It seems that if you suspend the app while the sharing dialog is active, upon resuming, the dialog disappears, and is stuck in some kind of zombie state where it can't be activated again.

    We're seeing a similar problem with a custom plugin that shows a GameCenter view natively, and it wasn't happening in an earlier version of Unity, so I suspect the problem is on their end.

    Has anyone else seen this, or know of a workaround?
     
  46. Chetim

    Chetim

    Joined:
    Jan 30, 2013
    Posts:
    12
    I have another issue. With Facebook, when the post box comes up, there's also a Location button on the lower left. If I press this, I get a notice to allow location services and I can choose to go to Settings or Not Allow. If I don't allow, the Facebook post box goes away but the keyboard stays up over the game and there seems to be no way to close it.

    Edit: Seems the issues with Facebook only occurs on simulators, but the same behavior occurs with Twitter on device builds (press Location button, get notice, twitter post dialog goes away but keyboard stays up). I noticed this in Crossy Road/PacMan 256 as well, but non-Unity games don't seem to have the issue. Is this a Unity bug?

    Seconding aaronflippo's issue as well.
     
    Last edited: Aug 24, 2015
  47. andrei-ichim

    andrei-ichim

    Joined:
    Oct 10, 2013
    Posts:
    22
    Hey,

    Great asset.

    I found a bug that I'd like to report.
    If you have Location Services disabled for twitter and you tap Location on the twitter popup you get another popup telling you that you need to enable it. After you close that popup the post on twitter popup is closed but the keyboard is still visible over the game and you can't close it. The game is stuck like that.

    Thanks,

    Andrei
     
  48. darkhus

    darkhus

    Joined:
    Nov 30, 2012
    Posts:
    17
    Hey,
    I got your plugin and I would like to share photos on Instagram, I got extension DInstagram from your website, but I dont understand how to lunch Instagram with Diffusion plugin... would you explain me like I would be three-years-old kid how to do it? I add DInstagram into Platforms list, but no effects...

    Thank you
     
  49. Chetim

    Chetim

    Joined:
    Jan 30, 2013
    Posts:
    12
    Do you have instagram installed on your device as well?
     
  50. darkhus

    darkhus

    Joined:
    Nov 30, 2012
    Posts:
    17
    Thank you for reply, I got instagram installed on my device. I run DInstagram extension (added to custom platform list), but when I want to share image I got message "No Image is attached". I checked in DInstagram.m file, and it's from that method:

    -(BOOL)canPerformWithActivityItems:(NSArray *)activityItems {
    // Check if IG is installed
    NSURL *instagramURL = [NSURL URLWithString:mad:"instagram://app"];
    if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
    // Check for an image
    for (id item in activityItems) {
    if ([self isImage:item]) {
    return YES;
    }
    }

    NSLog(@"[DInstagram] No image is attached");
    return NO;
    } else {
    NSLog(@"[DInstagram] Instagram is not installed on the device");
    return NO;
    }
    }

    is there any other way to lunch Instagram with Diffusion?
    Thank you