Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by Fattie · Apr 10, 2013 at 03:57 PM · facebookprime31

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! ");
     }


Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DaveA · Apr 10, 2013 at 04:32 PM 1
Share

$$anonymous$$akes me long for the good ole 'stack overflow' days, with their bounty system.

avatar image Fattie · Apr 10, 2013 at 06:51 PM 0
Share

i can't believe it, nobody cares about a $250 cash reward ?! WTH ???!

avatar image Eric5h5 · Apr 10, 2013 at 07:09 PM 1
Share

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.

avatar image Fattie · Apr 10, 2013 at 07:19 PM 0
Share

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"....

avatar image fafase · Apr 11, 2013 at 09:11 AM 0
Share

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...

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

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");
     }
Comment
Add comment · Show 14 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · Apr 11, 2013 at 05:02 AM 0
Share

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).

avatar image andsee · Apr 11, 2013 at 08:39 AM 0
Share

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.

avatar image Fattie · Apr 11, 2013 at 09:10 AM 0
Share

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 ...

avatar image Fattie · Apr 11, 2013 at 09:53 AM 0
Share

Ive stumbled on to considerable evidence that @andsee may be correct (and hence wins the reward ??!)

For example ...

http://stackoverflow.com/questions/9983296/how-can-i-use-the-facebook-javascript-api-to-automatically-make-a-user-like-a-pa/9986778#9986778

avatar image fafase · Apr 11, 2013 at 06:36 PM 1
Share

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".

Show more comments
avatar image
1

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?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · Apr 11, 2013 at 05:00 AM 0
Share

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 ..

alt text

.. 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!

fbexamp.png (20.5 kB)
avatar image Fattie · Apr 11, 2013 at 10:55 AM 0
Share

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.

avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Prime31 Logging into Facebook after getting permissions - the permission request dialog still appears 0 Answers

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges