- Home /
Facebook "Like", Prime31 (ACTUAL $400 PayPal REWARD)
It looks like @andsee has won this paid challenge, and been forwarded the reward. Thank you for the thousands of people, well 4, who contributed towards this fascinating experiment!! Thank you!
Now increased to $400 !!!
We'll pay a $400 reward instantly (paypal) to the fastest and most good answer here!!
To yourself or your favourite charity.
(Don't hesitate to "pm" me .. just click to the "forum" site to find the "pm" button - they didn't add a "pm" button on this answers site.)
We've recently had a hell of a time hiring someone, who is expert in using the Facebook "graph"
You would usually do Facebook functions in a Unity app -- iOS 6.0 -- using the Prime31 SocialNetworking plugin.
So I want someone to please show here precisely how you would do it.
Pls do not attempt this unless you are totally familiar with Facebook "apps", the appid / shared secret concept on facebook apps, you must be completely familiar with using Prime31's SocialNetworking plugin (or at least their other plugins), and of course you are familiar with the joys of the FB "graph" API etc.
Pls note that this has nothing to do with a URL link. In iOS6, users can be logged in to the inherent FB system that is now in iOS on the control panel, and then by using (typically) the Prime31 Plugin, you can then access, with that actual authorized FB user, the FB "graph" - and you can thus directly, within the app, do things like Like buttons (and indeed much much more).
So it will be a nice little but of open source, and if you know what you're doing claim the reward!!!!
Cheers!
#pragma strict
function OnGUI()
{
if (GUI.Button(Rect(20,20,1000,100),"FB Like /your FB test site" ))
YouDidThis();
}
function YouDidThis()
{
Debug.Log(" You add codes here, good luck! ");
}
$$anonymous$$akes me long for the good ole 'stack overflow' days, with their bounty system.
i can't believe it, nobody cares about a $250 cash reward ?! WTH ???!
That's a lot of APIs to be familiar with. Probably not many people know Unity && Prime31 plugins && Facebook apps && the graph API. In my case it's just the first.
You could well be right. It seems incredible -- Like buttons exist in Unity projects. the P31 plugin is just a bridge that allows you to use the FB-API so that's perhaps not problematic.
$$anonymous$$ikeD insists it's easy of course! :-)
http://prime31.com/support/693/socialnetworking-facebook-like-reward?show=703#a703
I just don't have time to get in to the FB API, and blokes who normally work with me are all flat out (and don't like FB :) ) I thought t would be a great opp. to work with someone new but for some weeks I have not been able to find anyone, at any price. Bunny won't even answer my emails ;-) It's a "business mystery"....
I see the reward has gone up $150 in one day, at this rate I am about to wait a few weeks before answering then. Also, I will take a few weeks to figure the answer out...
Answer by andsee · Apr 10, 2013 at 11:07 PM
Have you seen any apps that actually do this? Every one I've looked at opens up the Facebook page of the item you want to like either inside the facebook app or safari.
The following code will allow you to like objects that facebook allows (this does not include pages or apps).
public void Like(string likeID)
{
Facebook.instance.graphRequest(
likeID+"/likes",
HTTPVerb.POST,
( error, obj ) =>
{
if (obj != null)
{
Prime31.Utils.logObject( obj );
}
if( error != null )
{
Debug.Log("Error liking:"+error);
return;
}
Debug.Log( "like finished: " );
});
}
So for example the following will successfully like our upcoming game's picture:
if (GUILayout.Button( "Like Stuntman Eddie" ) )
{
Like("563245350362153");
}
however the following will return failure trying to like our company page
if (GUILayout.Button( "Like Tactile Fusion" ) )
{
Like("447312341955455");
}
If the above are not suitable then you can forcibly open the page in the facebook app it's self via:
if (GUILayout.Button( "Open Tactile Fusion Page in FB" ) )
{
Application.OpenURL("fb://profile/447312341955455");
}
Or if you want to open in safari if the facebook app is not installed and the facebook app if it is installed then the following will work, it appears that iOS captures the facebook.com and directs it to the app if installed automatically:
if (GUILayout.Button( "Open Tactile Fusion Page in safari" ) )
{
Application.OpenURL("http://www.facebook.com/447312341955455");
}
HI @andsee. Are you sure you have iOS6 on the iPad you're checking with? Load almost any current major title -- what about say "temple run brave". Load it, go to the first screen, click the ("woodcut!") FB logo at the bottom right. You can see the whole system. Or, just look at all the Apple doco for the iOS6 facebook "integration", also in your control panel on the iPad you'll see the whole "facebook" integration section (not unlike they added, say, notifications in an earlier era).
Hi, Yep. iOS 6, iPad, Facebook app installed, Temple Run Brave. If I click on the grey stone facebook logo in the bottom right of the app it asks for permission to post to your wall etc and logs you into face book but does not cause you to 'like' the game, nor can I see a like button anywhere.
It posts to my wall but does not like anything, is that what you're after?
$$anonymous$$y understanding is that it is not possible to like 'http://facebook.com/AmazingGame' for example from within your app without opening a web view with a like button in it (or the page you want them to like with it's own like button visible)
I've implemented most other facebook stuff in our Unity app with Prime31 and have challenges, via requests, posting to walls, leaderboards etc working.
Whilst the facebook documentation tells you you can like something with a graph request of object/likes I don't think that is possible where object is a page.
You can like posts and comments though if that's what you're after.
If you can provide an example link to what you want to like and either explain why I don't see what I thought you were after in Temble Brave or suggest another app I'll take another look.
I completely understand what you're saying .. fortunately I'm always prepared to be quite wrong! :)
https://developers.facebook.com/docs/reference/api/publishing/
stand by ...
Ive stumbled on to considerable evidence that @andsee may be correct (and hence wins the reward ??!)
For example ...
You did catch my intention but I have no clue... Next time put a $400 reward for "I need to access a variable from another script".
Answer by Yokimato · Apr 11, 2013 at 02:13 AM
I've done this from a web application. It's an app that's registered in FB and uses FB's graph to have them like posts and comments from the user's perspective. The only piece of your equation that I'm not 100% on is prime31, however, after reading the documentation, it seems straightforward. My only question I have is what is the user of your application actually 'Liking' when the button is clicked?
hi @Yoki ... I believe you may be the world's leading expert on the issue :)
Yes, that is all absolutely correct, and in answer to your question, it's a FB page. So you'd have facebook.com/AmazingGame right?
As you well know, that /AmazingGame property would be a facebook "app" at developer-facebook, and of course it would have a control panel ..
.. with an app id and shared secret. So that's exactly what you're asking, right? (As a FB developer, you may already have or may want to make a facebook/ExampleThing .) Cheers!
Ah - I've just realised what you said Yoki ...
have them like POSTS AND CO$$anonymous$$$$anonymous$$ENTS from the user's perspective
again this reinforces the notion you can use the API (aka "graph") when authorised / logged-in to "Like" things such as Posts.
But a lot of evidence seems to suggest you can't Like a FB page itself.
Answer by jesswil · Feb 18, 2015 at 03:11 PM
There's another excellent plugin for using Facebook with Unity worth checking out: https://www.assetstore.unity3d.com/en/#!/content/24601
Also check out the free game server offered by the same vendor.
Your answer
Follow this Question
Related Questions
iOS SocialNetworking (Facebook) not works proper when native facebook app not loged in 0 Answers
I cannot log into Facebook when logged in via the settings screen of iOS 0 Answers
prime31 socialnetworking twitter cant login 0 Answers
Failed first attempt when inviting friends using the Prime31 iOS Facebook Plugin 1 Answer