Haxe with facebook api v2.3

196 views
Skip to first unread message

Trieu Tran Quoc

unread,
Mar 30, 2015, 11:04:56 AM3/30/15
to haxe...@googlegroups.com
Hi all,
I want to integrate facebook into my app using haxe language.
Facebook api version is 2.3 now, who can suggest me a library to do this.
Thank so much.

PSvils

unread,
Mar 30, 2015, 11:17:14 AM3/30/15
to haxe...@googlegroups.com
You can just write externs for the API parts you're planning to use for whichever platform you're planning to use.
Not sure if they have a C++ version, but if they do, that'll be tougher to integrate, and you'll need to code a C++ layer to translate between haxe objects and the c++ objects.

Trieu Tran Quoc

unread,
Mar 30, 2015, 11:47:31 AM3/30/15
to haxe...@googlegroups.com
Thanks PSvils,
I'm new to haxe and not good at C++ :(, I just want to integrate on two platform: android, iOS.
Is there any simple way?
I see this link: https://github.com/hyperfiction/HypFacebook , but I don't know whether it support which version of facebook api.

PSvils

unread,
Mar 31, 2015, 8:41:34 AM3/31/15
to haxe...@googlegroups.com
If facebook has a REST API, then it should be easy to interact with it from any haxe platform using the haxe.Http class. That said, using the raw REST API might be a bit...cumbersome, hence they have platform specific APIs that probably wrap interaction with the REST api.

I would suggest exploring the HypFacebook library a bit more, at first glance it seems to be a good implementation (judging by having an actual README and seemingly supported by a company) :) If unsure, ask them yourself via a github issue or something.

Tarwin Stroh-Spijer

unread,
Mar 31, 2015, 4:42:28 PM3/31/15
to haxe...@googlegroups.com
Originally I used the PHP library wrapped in externs. I'm sure writing a pure haxe one wouldn't be too hard, as said above, using the HTTP class.

One thing to do with the return data is make TypeDefs for the JSON. Makes it super easy to work with, almost fun !



Tarwin Stroh-Spijer
_______________________

phone: +1 650 842 0920

Developer at Fanplayr Inc. (Palo Alto)
Original at Touch My Pixel (touchmypixel.com)
_______________________

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Trieu Tran Quoc

unread,
Mar 31, 2015, 9:47:38 PM3/31/15
to haxe...@googlegroups.com, tar...@touchmypixel.com
Thank all :).
If using pure haxe, no problem with accessing graph api. We just need normal http requests. 
But If I want to LOGIN facebook and get user access token, please tell me whether it's possible via using pure haxe? Please explain more detail if it's possible.
Whether we must use haxe webview or develop a native extension(too hard for me because I'm not familiar with Android/Objective-C/C++)?
Thanks :)

Daniel Uranga

unread,
Mar 31, 2015, 11:50:40 PM3/31/15
to haxe...@googlegroups.com, tar...@touchmypixel.com
Maybe you can use this https://github.com/DanielUranga/extension-gpgrest as a basis. Its the Google Play Games REST api, logins into Google and get user token etc.

Tarwin Stroh-Spijer

unread,
Apr 1, 2015, 12:03:27 AM4/1/15
to haxe...@googlegroups.com
How about this. Just searched "haxe Facebook extension".

https://github.com/hyperfiction/HypFacebook

Also, this blog post about creating native extensions looks pretty damn easy!




Tarwin Stroh-Spijer
_______________________

phone: +1 650 842 0920

Developer at Fanplayr Inc. (Palo Alto)
Original at Touch My Pixel (touchmypixel.com)
_______________________

Trieu Tran Quoc

unread,
Apr 1, 2015, 12:06:40 AM4/1/15
to haxe...@googlegroups.com, tar...@touchmypixel.com
@Daniel Uranga: I just need to integrate with facebook, not google play game service :)

Trieu Tran Quoc

unread,
Apr 1, 2015, 12:09:20 AM4/1/15
to haxe...@googlegroups.com, tar...@touchmypixel.com
@Tarwin Stroh-Spijer: I know this extension, but maybe it's too old and can't use for facebook api v 2.3

Tarwin Stroh-Spijer

unread,
Apr 1, 2015, 5:10:46 AM4/1/15
to haxe...@googlegroups.com
I'm sure it wouldn't be too hard to update no? What are the changes?



Tarwin Stroh-Spijer
_______________________

phone: +1 650 842 0920

Developer at Fanplayr Inc. (Palo Alto)
Original at Touch My Pixel (touchmypixel.com)
_______________________

Trieu Tran Quoc

unread,
Apr 2, 2015, 4:28:11 AM4/2/15
to haxe...@googlegroups.com, tar...@touchmypixel.com
Thank Tarwin Stroh-Spijer,
I will try to modify this extension to use with openfl and new facebook sdk :) (or write a new extension for my purpose)

Tarwin Stroh-Spijer

unread,
Apr 2, 2015, 5:09:46 PM4/2/15
to haxe...@googlegroups.com
Well if you do I'm sure the community would love to see your changes, and then help to keep it up to date :D



Tarwin Stroh-Spijer
_______________________

phone: +1 650 842 0920

Developer at Fanplayr Inc. (Palo Alto)
Original at Touch My Pixel (touchmypixel.com)
_______________________

Reply all
Reply to author
Forward
0 new messages