[Construct 2] Cocoon Social (Facebook) guide and examples


#1

Hi!

Sorry that it did take so long, but here is a first, simple example showing you how to use the basic functions of the Cocoon Facebook plugin. The source code is available for Construct 2 (at least r227).
You can download the example files here

Cocoon - Social (for Facebook)

If you want to test it live on your smartphone (Android), then you can download a test apk file here.

Cocoon - Social (Android Demo)

Moreover you find some other free code examples here:

Overview of free examples

Tutorial
The tutorial can be found here
Shatter-Box or Cocoon Documents

License
Please, those files are for study and personal use only. If you want to use code snippets from it in your final game, purchase a license for it (just 3$ per project / platform) here.

CocoonIO - Developer Template for Construct 2 (Scirra Store)

Thank you for your support!

Help & Support
The example will be extended, so check it regulary. If you are facing some issues, please let me know.
I’m glad to help each of you. If you completely new to Construct 2 and CocoonIO, I recommend you my E-Book “Quick Stater Guide”.

Feel free to reply to this topic if you stuck, want to say thank you and so on :wink:

Regards
Andy


#2

Hi Andy, thanks for Facebook tutorials. It’s an important thing and so rarely found in C2 projects. I build some test app using your tut. and its work fine. But I think there will be some problem with posting Play Store APP’s page URL instead public site (like in your example) In case of GP link, the dialog text will automatic replaced by market data, as well as Images.

From Facebook Docs:

Note: If your app share links to the iTunes or Google Play stores, we do not post any images or descriptions that you specify in the share. Instead we post some app information we scrape from the app store directly with the Webcrawler.

Maybe you can understand / explain this issue and how to implement this in practice/with plugin?

And the solution:
https://developers.facebook.com/docs/applinks/hosting-api


#3

Hi, @andy_reitberger. Thanks for tutorial! Link for shatter-box is broken.


#4

Hi @rodikove
Thank you for letting me know. The link is now working again.

Thank you!

@Nagval33
Thank you for your reply. If you add an link to the dialog parameter, and the link is an app (iTunes or Google Play); then it will not show the provided image (if you have specified one) but the images from the Google Play or iTunes Store page.

It’s been awhile since I have worked with Facebook. I’m currently about to update Shatter-Box.com
The new design forced me to recreate all tutorials (that’s why some links are broken) Once all is working again, I’ll see what I can do with the Facebook Tutorial.

Thank you!

Regards
Andy


#5

Facebook image problems. Hi Andy. I just can’t make it work! I even used as a example test link to your site “http://shatter-box.com” As a image I used different Images url on Tumbler etc, different sizes 150,250 But It still doesn’t works. It’s just show me blank square


#6

Hi,

I actually gave up working with Facebook due this bug.

Haven’t you faced this issue? Once this has been fixed, I would start over again with my Facebook examples and guides.

Regards
Andy


#7

Hi Andy, I didn’t faced it.

But I find how to make URL to Google Play market with your text (Record Share etc), image (now images not works) etc without Facebook automatically replace it with market data. If you remember my previous question:

Hi Andy, thanks for Facebook tutorials. It’s an
important thing and so rarely found in C2 projects. I build some test
app using your tut. and its work fine. But I think there will be some
problem with posting Play Store APP’s page URL instead public site
(like in your example) In case of GP link, the dialog text will
automatic replaced by market data, as well as Images.

From Facebook Docs:

Note: If your app share links to the iTunes or Google
Play stores, we do not post any images or descriptions that you specify
in the share. Instead we post some app information we scrape from the
app store directly with the Webcrawler.

Maybe you can understand / explain this issue and how to implement this in practice/with plugin?

And the solution:
https://developers.facebook.com/docs/applinks/hosting-api

You have just follow the instructions and “Create App Link” in https://developers.facebook.com/docs/applinks/hosting-api and generate by facebook new link to you market, something like this: “https://fb.me/123456789012345” and use it instead of you regular market link.

:slight_smile:


#8

Thank you for letting me know about this. I’ll keep that in mind.
I hope that I find some time soon to start over with Facebook again.

P.S. if you want to make your own tutorials, you can submit them on shatter-box as well :wink:

https://shatter-box.com/tutorial-submission/

Regards
Andy


#9

Thanks Andy BUT
when I tried run layout: CocoonFacebook.capx nothing happend when I clicked on share. Button is blank. Please help

Cocoon - Social (for Facebook) Andreas Reitberger 1.0.1 from here:


#10

Hi,
the example is pretty old. I’m not sure if it’s still working.
I’ll check it.
Just to be sure have you installed the corresponding Facebook plugin at your cocoon project?

Regards
Andy


#11

Hey
Yes I’m sure, but now I see that nothing works with that action “CocoonFacebook”. Button is not clickable., even when I uploaded to cocoon and compiled with necessary plugins


Unity ads cranberry construct 2
#12

We have the same problems, but with other plugins:
https://forums.cocoon.io/t/unity-ads-cranberry-construct-2/6455
https://forums.cocoon.io/t/heyzap-does-not-work-on-android/6399


#13

Hi Andy!

Really counting on you to help with the FB plugin. Looks like lot many people are too :slight_smile:
I tried your APK, but nothing seems to happen when I try to Share my Score. Would be great if you gave it a quick look, I bet it must be a very small change for you. But for us fans it will be a really great favour

There are no other plugins that works as good as yours.
Hope to hear from you soon :slight_smile:


#14

Hi Nagval33
How did you create the complete the steps for “Create an Intent Filter in Android” and “Handle Incoming URLs in Android” on Construct 2?

Could you please guide me?


#15

Have you checked this plugin?


#16

Not yet, however it’s on my list. Have you tried it with an older Cocoon Version?

Regards
Andy


#17

On older versions of the Cocoon the plugin does not work.


#18

Not working anymore, even in my old games (web and GP) this stopped working… Pretty annoying :frowning: