[IOS/Android] Simple Share to email/Twitter/Facebook etc[V1.9.6]

robinschaafsma

  • *
  • Posts: 714
I closed and opened Stencyl and its working for Twitter. But as you indicated, it's not working for FB due to the policy. How can I set the button so that it straights away access FB instead of opening up a list of apps to share?

Thanks!

You can't. It must be done in the hard code of the extension.

chongyunxiang

  • Posts: 278
Oh! Ok, I understand! Are there any extensions that is similar to this, but enables developers to choose which platform to share message to? Because on my Android, there are so many apps to share to, like Messages, LinkedIn, Bluetooth (have no idea why), Wordpress, Mail etc. I wonder if it's the same for the other users but for me its too many! HAHA!

Thanks!

robinschaafsma

  • *
  • Posts: 714
No this is the only share extension...

stefan

  • *
  • Posts: 2263
@Robinschaafsma. I am creating a tutorial series dedicated to this tutorial. Is it me or can you only share the screenshot OR the link in one FB share? If I select to create a screenshot, it will post the image, but not the website link (I know the message itself will not be posted anyway), and if I select not to create a screenshot, it will post the link.

(p.s. +1 voor hollanders!)

robinschaafsma

  • *
  • Posts: 714
Yes, You can only share screenshot OR the link in one FB share. There is no room for both.

Bhoopalan

  • Posts: 1018
Nevermind, I managed to exclude most of the unnecessary sharing options like print and copy to paste board. :)

Code: [Select]
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:shareItems applicationActivities:nil];
       
        NSArray *excludeActivities = @[UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, UIActivityTypeAddToReadingList, UIActivityTypePostToFlickr, UIActivityTypePostToVimeo, UIActivityTypePostToTencentWeibo, UIActivityTypePostToWeibo];
       
        avc.excludedActivityTypes = excludeActivities;



I kept Air Drop because that actually works well and may be useful maybe?

I would like to use the facebook share option separately and would like to exclude that option from this simpleshare list. Can someone help how I would do that?  Where will I find this code mentioned above?
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

Bhoopalan

  • Posts: 1018
Nevermind, I managed to exclude most of the unnecessary sharing options like print and copy to paste board. :)

Code: [Select]
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:shareItems applicationActivities:nil];
       
        NSArray *excludeActivities = @[UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, UIActivityTypeAddToReadingList, UIActivityTypePostToFlickr, UIActivityTypePostToVimeo, UIActivityTypePostToTencentWeibo, UIActivityTypePostToWeibo];
       
        avc.excludedActivityTypes = excludeActivities;



I kept Air Drop because that actually works well and may be useful maybe?

I would like to use the facebook share option separately and would like to exclude that option from this simpleshare list. Can someone help how I would do that?  Where will I find this code mentioned above?

Could somebody please help me with this? I'm not sure how to exclude the sharing options I don't want.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

EfrenStudios

  • Posts: 283
Hello.

I recently update to the newer version of this extension wihout hesitate.

I don't remember which version did I have, but now I am unable to continue.

I followed the installation fix for versions after 1.7, but It did not work.  It doesn't work rename the folder either.  I have been able to see just one extension instead of two, but anyway, the proble is still the same.

Could you help me on this?
Everything is good if have pixel art on it...

Bhoopalan

  • Posts: 1018
Hello.

I recently update to the newer version of this extension wihout hesitate.

I don't remember which version did I have, but now I am unable to continue.

I followed the installation fix for versions after 1.7, but It did not work.  It doesn't work rename the folder either.  I have been able to see just one extension instead of two, but anyway, the proble is still the same.

Could you help me on this?

Just sharing my experience.

When I tried to run the game with the 'share' blocks in flash player, it threw error.  However, there is no issue when compiling for android. Sharing works great as well. Are you trying the same?
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

EfrenStudios

  • Posts: 283
Thanks Bhoopalan.

Actually is the only use I have for the button indeed.  I was planning to use it on flash as well, but that's not the case.

The problem is that before this error wasn't present when I compiled on flash.  I mean, It could be a lot of work to remove the blocks and put them again each time I have to switch from android to flash.

Also, as far as I remember it worked well on flash.  I wonder if this doesn't apply anymore?  I would like to use it on flash or windows.
Everything is good if have pixel art on it...

Bhoopalan

  • Posts: 1018
Thanks Bhoopalan.

Actually is the only use I have for the button indeed.  I was planning to use it on flash as well, but that's not the case.

The problem is that before this error wasn't present when I compiled on flash.  I mean, It could be a lot of work to remove the blocks and put them again each time I have to switch from android to flash.

Also, as far as I remember it worked well on flash.  I wonder if this doesn't apply anymore?  I would like to use it on flash or windows.

My pleasure. Did it work on flash? I thought it was only for mobile. In that case, I'm also encountering the same problem as you. I get the same error when I compile it for flash. Even if I use 'do on mobile' block, it still throws the same error you've mentioned.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

robinschaafsma

  • *
  • Posts: 714
Because its a mobile extension, the compatibility is mobile only.
 You must use the share blocks between the "do only on mobile" block when compiling in flash.



Or you can change info.txt in the extension folder if you have still problems. (Not recommended)
From
Code: [Select]
compatibility=mobileTo
Code: [Select]
compatibility=allDon'f forget to restart Stencyl


EfrenStudios

  • Posts: 283
Oh I didn't know that (the limits of support).

Thanks a lot!  That made the cut.

Thanks again for such a great extension :)
Everything is good if have pixel art on it...

Bhoopalan

  • Posts: 1018
Indeed, a great extension. I may have missed to thank earlier.

Thanks so much :)
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

Dirwin3498

  • Posts: 17
I get an error everytime I try to use one of the blocks, I have the latest build of stencyl