121
Extensions / Re: !!!! Ojya Leaderboard Facebook Extension !!!!
« on: August 27, 2015, 09:09:36 am »
SITE IS BACK TO GET THE EXTENSION.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Hi there,
someone managed to use the functions to read data from the player data and friends?
lists always return with null.
sorry for my English.
Maxi.
Andrew, david is the guy who made the plugin. Im just using it and im not exactly sure how it works. The plugin was working perfectly for stencyl 3.0, due to the new admob sdk all of us have had to move to stencyl 3.2 and now there are some compatibility issues. The only progress ive made so far for 3.2 is that there are no compile errors, but the facebook post dialogue doesnt appear when the post block is called within stencyl.Hello Z. Thanks for you reply. Actually the post block works for me. I am with Stencyl 3.1.
David is the only guy who can help out ATM. Lets hope he finds time to get this up n running.
David
I have a build coming up in 10 days, would really appreciate an update for 3.2 , dont wanna release without it. Willing to help anyway i can. All the best,
Z
Hello Z,
please can you tell me if you can make work a GRAPH REQUEST /ME and have the response back with the listener ?
For me doesn't work.
The response in stencil works if i give a variable of mine like "HELLO". But it doesn't work with _myvar = event.sResult.
Is always null. So i think the GRAPH response or actually POST is doing nothing.
I am working on iOS.
Maybe there is a problem with the hypfacebook and Facebook sdk etc......
I mean the Haxe code in facebookextension.hx works really great and gives results back in stencil.
I would appreciate your help. I followed all the steps as you said before to install macros etc. No compile errors.
Thanks
Andrew
David
I have a build coming up in 10 days, would really appreciate an update for 3.2 , dont wanna release without it. Willing to help anyway i can. All the best,
Z
After a couple days, I've managed to modify the extension to allow my games to 'LIKE' a URL link and post it to a user's timeline.
Start by modifying the FacebookExtension.hx file found in:
"[Stencyl Install Location]\plaf\haxe\extensions\facebook\FacebookExtension.hx"
Add:Code: [Select]public static var _likeActionInstance: String;
public static var _error: String;
public static function facebookLikeUrl(URL: String){
//Add a listener to run after the data is retreived
fb.addEventListener( HypFacebookRequestEvent.GRAPH_REQUEST_RESULTS, _onLikeComplete );
var arr:Array<String> = ["publish_actions"];
fb.requestNew_publish_permissions(arr);
var h = new Map<String,String>( );
h.set( 'object', URL ); //Set the URL to like
fb.call( GRAPH_REQUEST("/v2.0/me/og.likes", h , POST) );
}
public static function _onLikeComplete( event : HypFacebookRequestEvent ) : Void {
_likeActionInstance = event.sResult;
_error = event.sError;
}
public static function getLikeStatusInstance (): String{ return _likeActionInstance; }
public static function getLastErrorMessage (): String { return _error; }
Then add the following code to the blocks.xml file located:
"[Stencyl Install Location]\plaf\haxe\extensions\facebook\blocks.xml"Code: [Select]<block tag="fb-like" spec="Facebook User Likes URL: %0" code="FacebokExtension.facebookLikeUrl(~);" type="action" color="blue" returns="void">
<fields>
<text order="0"></text>
</fields>
</block>
<block tag="fb-like-instance" spec="Get Like Action Instance" code="FacebokExtension.getLikeStatusInstance()" type="normal" color="gray" returns="text">
<fields></fields>
</block>
<block tag="fb-last-error" spec="Get Last Error" code="FacebokExtension.getLastErrorMessage()" type="normal" color="gray" returns="text">
<fields></fields>
</block>
Close any existing game and reopen. New blocks will be available in the Custom block location.
After a couple days, I've managed to modify the extension to allow my games to 'LIKE' a URL link and post it to a user's timeline.
Start by modifying the FacebookExtension.hx file found in:
"[Stencyl Install Location]\plaf\haxe\extensions\facebook\FacebookExtension.hx"
Add:Code: [Select]public static var _likeActionInstance: String;
public static var _error: String;
public static function facebookLikeUrl(URL: String){
//Add a listener to run after the data is retreived
fb.addEventListener( HypFacebookRequestEvent.GRAPH_REQUEST_RESULTS, _onLikeComplete );
var arr:Array<String> = ["publish_actions"];
fb.requestNew_publish_permissions(arr);
var h = new Map<String,String>( );
h.set( 'object', URL ); //Set the URL to like
fb.call( GRAPH_REQUEST("/v2.0/me/og.likes", h , POST) );
}
public static function _onLikeComplete( event : HypFacebookRequestEvent ) : Void {
_likeActionInstance = event.sResult;
_error = event.sError;
}
public static function getLikeStatusInstance (): String{ return _likeActionInstance; }
public static function getLastErrorMessage (): String { return _error; }
Then add the following code to the blocks.xml file located:
"[Stencyl Install Location]\plaf\haxe\extensions\facebook\blocks.xml"Code: [Select]<block tag="fb-like" spec="Facebook User Likes URL: %0" code="FacebokExtension.facebookLikeUrl(~);" type="action" color="blue" returns="void">
<fields>
<text order="0"></text>
</fields>
</block>
<block tag="fb-like-instance" spec="Get Like Action Instance" code="FacebokExtension.getLikeStatusInstance()" type="normal" color="gray" returns="text">
<fields></fields>
</block>
<block tag="fb-last-error" spec="Get Last Error" code="FacebokExtension.getLastErrorMessage()" type="normal" color="gray" returns="text">
<fields></fields>
</block>
Close any existing game and reopen. New blocks will be available in the Custom block location.
After a couple days, I've managed to modify the extension to allow my games to 'LIKE' a URL link and post it to a user's timeline.
Start by modifying the FacebookExtension.hx file found in:
"[Stencyl Install Location]\plaf\haxe\extensions\facebook\FacebookExtension.hx"
Add:Code: [Select]public static var _likeActionInstance: String;
public static var _error: String;
public static function facebookLikeUrl(URL: String){
//Add a listener to run after the data is retreived
fb.addEventListener( HypFacebookRequestEvent.GRAPH_REQUEST_RESULTS, _onLikeComplete );
var arr:Array<String> = ["publish_actions"];
fb.requestNew_publish_permissions(arr);
var h = new Map<String,String>( );
h.set( 'object', URL ); //Set the URL to like
fb.call( GRAPH_REQUEST("/v2.0/me/og.likes", h , POST) );
}
public static function _onLikeComplete( event : HypFacebookRequestEvent ) : Void {
_likeActionInstance = event.sResult;
_error = event.sError;
}
public static function getLikeStatusInstance (): String{ return _likeActionInstance; }
public static function getLastErrorMessage (): String { return _error; }
Then add the following code to the blocks.xml file located:
"[Stencyl Install Location]\plaf\haxe\extensions\facebook\blocks.xml"Code: [Select]<block tag="fb-like" spec="Facebook User Likes URL: %0" code="FacebokExtension.facebookLikeUrl(~);" type="action" color="blue" returns="void">
<fields>
<text order="0"></text>
</fields>
</block>
<block tag="fb-like-instance" spec="Get Like Action Instance" code="FacebokExtension.getLikeStatusInstance()" type="normal" color="gray" returns="text">
<fields></fields>
</block>
<block tag="fb-last-error" spec="Get Last Error" code="FacebokExtension.getLastErrorMessage()" type="normal" color="gray" returns="text">
<fields></fields>
</block>
Close any existing game and reopen. New blocks will be available in the Custom block location.