sharing

UIActivityViewController share only text

梦想与她 提交于 2019-12-18 16:31:34
问题 I want to share just simple text using UIActivityViewController I am using swift, with xcode 6.3 The code is very simple, work great for photos, but not just text, I don't want to include any web URL with the objectsToShare, just clean text Here is the code: var objectsToShare: ["some text to share"]! let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) //handler for completed task activityVC.completionHandler = {(activityType, completed:Bool)

Angular 2 modals shared between components

こ雲淡風輕ζ 提交于 2019-12-18 09:37:04
问题 I have a typical Angular 2 app with many components. I installed this modal component: https://github.com/pleerock/ng2-modal. Is there a way to share the same modals between more components? I explain better. I would like the same modal should open on click of different buttons inside different components. Is it possible? I tried this kind of approach https://plnkr.co/edit/RgI1e9PobC7FloLHpEFD?p=preview but it's not the right way, because it always adds content to the modal. I post it here

Attach object using iOS6 UIActivityViewController

夙愿已清 提交于 2019-12-18 04:11:11
问题 I'm migrating to use the UIActivityViewController for sharing in iOS6, but I can't figure out how to create email attachment objects to be included when sharing by email. The corresponding code in iOS5 is: MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; [picker addAttachmentData:data mimeType:@"application/XXX" fileName:fileName]; 回答1: You have very limited control over UIActivityViewController, but if you're attaching well-know mime types, I found you can

Facebook stops custom parameters (image,title,description) through FB.ui?

断了今生、忘了曾经 提交于 2019-12-18 02:58:09
问题 Today I check my site and this code not working: <script> ... FB.ui({ display: 'dialog', method: 'share_open_graph', action_type: 'og.likes', hashtag: '#Testing', action_properties: JSON.stringify({ object: { 'og:image': img, 'og:image:secure_url': img, 'og:image:type': 'image/jpeg', 'og:image:width': w, 'og:image:height': h, 'og:image:alt': img, 'og:url': link, 'og:title': title, 'og:description': desc, 'fb:admins': fbadmin } }) }, function(response) { if (typeof response != 'undefined') { /

Social action sheet (like on iOS 6)

廉价感情. 提交于 2019-12-17 17:37:19
问题 on iOS 6 a change was that when you want to share something it brings up an action sheet similar to this: I have seen a few other apps that use this, is there a native way to do this without making a custom action sheet? Thanks! 回答1: NSString *textToShare = @"your text"; UIImage *imageToShare = [UIImage imageNamed:@"yourImage.png"]; NSArray *itemsToShare = @[textToShare, imageToShare]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare

Sharing cookies across different domains and different applications (classic ASP and ASP.NET)

本小妞迷上赌 提交于 2019-12-17 09:57:38
问题 Is there a way to share cookies across different domains and different applications (classic ASP and ASP.NET) 回答1: No, there isn't. The issue is the cross domain one, rather than the asp.net/classic asp and is security reasons. If the domains are subdomains you can share the cookies, provided you use a cookie path that both can access (ie. for the domain sub.example.com you can read and write cookies using the example.com domain). 回答2: You can share cookies via some behind the scenes

Sharing cookies across different domains and different applications (classic ASP and ASP.NET)

泄露秘密 提交于 2019-12-17 09:57:23
问题 Is there a way to share cookies across different domains and different applications (classic ASP and ASP.NET) 回答1: No, there isn't. The issue is the cross domain one, rather than the asp.net/classic asp and is security reasons. If the domains are subdomains you can share the cookies, provided you use a cookie path that both can access (ie. for the domain sub.example.com you can read and write cookies using the example.com domain). 回答2: You can share cookies via some behind the scenes

Updating GUI (WPF) using a different thread

六月ゝ 毕业季﹏ 提交于 2019-12-17 04:25:32
问题 Just have a problem here that I have no idea how to fix. I am doing a small project which involves a GUI and serial data. The GUI is being run by the main thread and since the data variables that hold my incoming serial data need to be updated continuously, these are being updated in a second thread. The problem is when I need to update some textboxes on the GUI, these need to be updated with data from the secondary thread and that is where my problem lies. I can't update them directly from

How to share textures between an NSOpenGLView and a full screen context in Mac OS?

社会主义新天地 提交于 2019-12-13 14:42:10
问题 I am working on an app that uses 2D textures to create animated kaleidoscopes. It starts out displaying to an NSOpenGLView. I am adding an option to switch to full-screen mode. I would prefer to use the OS 10.5 approach to full screen so I can support 10.5, but I think I would face the same issue if I was using the approach described in the docs under "Creating a Full-Screen Application in Mac OS X v10.6". The NSOpenGLContext init method initWithFormat:shareContext: takes an optional pointer

og:image was not defined, could not be downloaded or was not big enough error *despite* image sizes being specified

蓝咒 提交于 2019-12-13 05:19:42
问题 I am trying to get my site (katzcoffee.com) to show up properly while sharing to facebook, but I'm getting this error: og:image was not defined, could not be downloaded or was not big enough. Please define a chosen image using the og:image metatag, and use an image that's at least 200x200px and is accessible from Facebook. Image 'https://www.katzcoffee.com/sites/katzcoffee.com/files/styles/front_slider/public/11393131_10152775065312024_6813174683857555982_n_1.jpg?itok=BHzNjEH7' will be used