Deploy the facebook function on IOS (unity3d-based plug-in socialNetwork)

Source: Internet
Author: User

 

First go here to download the plug-in http://vdisk.weibo.com/s/fQBrQ

 

Requirements:

Unity3d version 3.5.6 or later
XCode version 4.5.0 or later

 

Note:

This plug-in can only run on IOS, not on ANDROID

 

First, go to facebook to register a developer account, create an application, get the facebook app id and screat,

Import the plug-in and enter the menu prime31-> info. plist. addtions... under CFBundle URLSchemes, change the size to 1, and then enter your facebook app id under Element0.

The id format is fb with your app id, such as fb444451222

 

How to use facebook API (socialNetwork:

1,

Send messages to the wall message board of a friend using the native method. This method will pop up a window on the IOS interface for users to enter information.

 

To: ID of the friend after the Parameter

Link: the subsequent parameter is the image link of the message.

Picture: The image address of the message.

Name: indicates the message name.

Caption: The title name.

Description: The description.

var parameters = new Dictionary<string,string>{{"to", isc.fbUserID},{"link", link},{"picture", picture},{"name", ArticleName},{"caption", caption},{"description", description}};FacebookBinding.showDialog( "stream.publish", parameters );

  

 

2,

Send messages to your own wall message board using the native method. This method will pop up a window on the IOS interface for users to enter information, as long as the to parameter is not added.

 

Link: the subsequent parameter is the image link of the message.

Picture: The image address of the message.

Name: indicates the message name.

Caption: The title name.

Description: The description.

var parameters = new Dictionary<string,string>{{"link", link},{"picture", picture},{"name", ArticleName},{"caption", caption},{"description", description}};FacebookBinding.showDialog( "stream.publish", parameters );
 

All the specific parameters can be found in this document.

Http://developers.facebook.com/docs/reference/dialogs/feed/

 

 

Note:

It is best for facebook to send requests only once within a certain period of time, otherwise there will be various unknown problems, such as request failure, especially login requests and logout requests, and also, logout request failure events and the Logon Request failure event is the same event. Remember!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.