public static void AppRequest( string message, string[] to = null, List <object> filters = null, string[] excludeIds = null, int?maxRecipients = null, string data = "", string title = "", FacebookDelegate callback = null) { FacebookImpl.AppRequest(message, null, null, to, filters, excludeIds, maxRecipients, data, title, callback); }
/// <summary> /// Logs the purchase. /// </summary> /// <param name="logPurchase">The amount of currency the user spent.</param> /// <param name="currency">The 3-letter ISO currency code.</param> /// <param name="parameters"> /// Any parameters needed to describe the event. /// Elements included in this dictionary can't be null. /// </param> public static void LogPurchase( float logPurchase, string currency = null, Dictionary <string, object> parameters = null) { if (string.IsNullOrEmpty(currency)) { currency = "USD"; } FacebookImpl.AppEventsLogPurchase(logPurchase, currency, parameters); }
/// <summary> /// Apps the request. /// </summary> /// <param name="message">The request string the recipient will see, maximum length 60 characters.</param> /// <param name="to">A list of Facebook IDs to which to send the request.</param> /// <param name="filters"> /// The configuration of the platform multi-friend selector. /// It should be a List of filter strings. /// </param> /// <param name="excludeIds"> /// A list of Facebook IDs to exclude from the platform multi-friend selector dialog. /// This list is currently not supported for mobile devices. /// </param> /// <param name="maxRecipients"> /// Platform-dependent The maximum number of recipients the sender should be able to /// choose in the platform multi-friend selector dialog. /// Only guaranteed to work in Unity Web Player app. /// </param> /// <param name="data"> /// Additional data stored with the request on Facebook, and handed /// back to the app when it reads the request back out. /// Maximum length 255 characters. /// </param> /// <param name="title"> /// The title for the platform multi-friend selector dialog. Max length 50 characters. /// </param> /// <param name="callback">A callback for when the request completes.</param> public static void AppRequest( string message, IEnumerable <string> to = null, IEnumerable <object> filters = null, IEnumerable <string> excludeIds = null, int?maxRecipients = null, string data = "", string title = "", FacebookDelegate <IAppRequestResult> callback = null) { FacebookImpl.AppRequest(message, null, null, to, filters, excludeIds, maxRecipients, data, title, callback); }
/// <summary> /// Makes a call to the Facebook Graph API. /// </summary> /// <param name="query"> /// The Graph API endpoint to call. /// You may prefix this with a version string to call a particular version of the API. /// </param> /// <param name="method">The HTTP method to use in the call.</param> /// <param name="callback">The callback to use upon completion.</param> /// <param name="formData">Form data for the request.</param> public static void API( string query, HttpMethod method, FacebookDelegate <IGraphResult> callback, WWWForm formData) { if (string.IsNullOrEmpty(query)) { throw new ArgumentNullException("query", "The query param cannot be null or empty"); } FacebookImpl.API(query, method, formData, callback); }
public static void Pay( string product, string action = "purchaseitem", int quantity = 1, int?quantityMin = null, int?quantityMax = null, string requestId = null, string pricepointId = null, string testCurrency = null, FacebookDelegate callback = null) { FacebookImpl.Pay(product, action, quantity, quantityMin, quantityMax, requestId, pricepointId, testCurrency, callback); }
public static void AppRequest( string message, OGActionType actionType, string objectId, string filters = "", string[] excludeIds = null, int?maxRecipients = null, string data = "", string title = "", FacebookDelegate callback = null) { FacebookImpl.AppRequest(message, actionType, objectId, null, filters, excludeIds, maxRecipients, data, title, callback); }
/// <summary> /// Opens a share dialog for sharing a link. /// </summary> /// <param name="contentURL">The URL or the link to share.</param> /// <param name="contentTitle">The title to display for this link..</param> /// <param name="contentDescription"> /// The description of the link. If not specified, this field is automatically populated by /// information scraped from the link, typically the title of the page. /// </param> /// <param name="photoURL">The URL of a picture to attach to this content.</param> /// <param name="callback">A callback for when the request completes.</param> public static void ShareLink( Uri contentURL = null, string contentTitle = "", string contentDescription = "", Uri photoURL = null, FacebookDelegate <IShareResult> callback = null) { FacebookImpl.ShareLink( contentURL, contentTitle, contentDescription, photoURL, callback); }
/// <summary> /// 分享视频,支持一张预览图片 /// </summary> /// <param name="contentTitle"></param> /// <param name="contentDescription"></param> /// <param name="previewPhotoURL"></param> /// <param name="videoURL">视频在本地的url</param> /// <param name="callback"></param> public static void ShareVideo( string contentTitle = "", string contentDescription = "", Uri previewPhotoURL = null, Uri videoURL = null, FacebookDelegate <IShareResult> callback = null) { FacebookImpl.ShareVideo( contentTitle, contentDescription, previewPhotoURL, videoURL, callback); }
/// <summary> /// 分享单张图片 /// </summary> /// <param name="texture2D">想要分享的texutre2D</param> /// <param name="photoURL">想要分享的文件url,可以是本地文件也可以是网络文件;texutre2D参数与photoURL参数只能2选中,若两者都传,优先使用texture2D</param> /// <param name="userGenerated"></param> /// <param name="caption"></param> /// <param name="callback"></param> public static void SharePhoto( Texture2D texture2D = null, Uri photoURL = null, bool userGenerated = false, string caption = "", FacebookDelegate <IShareResult> callback = null) { FacebookImpl.SharePhoto( texture2D, photoURL, userGenerated, caption, callback); }
private static void OnDllLoaded() { FB.LogVersion(); FacebookImpl.Init( appId, cookie, logging, status, xfbml, FacebookSettings.ChannelUrl, authResponse, frictionlessRequests, onHideUnity, onInitComplete); }
private static void OnDllLoaded() { FbDebug.Log("Finished loading Facebook dll. Build " + FBBuildVersionAttribute.GetBuildVersionOfType(FacebookImpl.GetType())); FacebookImpl.Init( OnInitComplete, FBSettings.AppId, FBSettings.Cookie, FBSettings.Logging, FBSettings.Status, FBSettings.Xfbml, FBSettings.ChannelUrl, authResponse, FBSettings.FrictionlessRequests, OnHideUnity ); }
public static void Feed( string toId = "", string link = "", string linkName = "", string linkCaption = "", string linkDescription = "", string picture = "", string mediaSource = "", string actionName = "", string actionLink = "", string reference = "", Dictionary <string, string[]> properties = null, FacebookDelegate callback = null) { FacebookImpl.FeedRequest(toId, link, linkName, linkCaption, linkDescription, picture, mediaSource, actionName, actionLink, reference, properties, callback); }
/// <summary> /// Legacy feed share. Only use this dialog if you need the legacy parameters otherwiese use /// <see cref="FB.ShareLink(System.String, System.String, System.String, System.String, Facebook.FacebookDelegate"/>. /// </summary> /// <param name="toId"> /// The ID of the profile that this story will be published to. /// If this is unspecified, it defaults to the value of from. /// The ID must be a friend who also uses your app. /// </param> /// <param name="link">The link attached to this post.</param> /// <param name="linkName">The name of the link attachment.</param> /// <param name="linkCaption"> /// The caption of the link (appears beneath the link name). /// If not specified, this field is automatically populated /// with the URL of the link. /// </param> /// <param name="linkDescription"> /// The description of the link (appears beneath the link caption). /// If not specified, this field is automatically populated by information /// scraped from the link, typically the title of the page. /// </param> /// <param name="picture"> /// The URL of a picture attached to this post. /// The picture must be at least 200px by 200px. /// See our documentation on sharing best practices for more information on sizes. /// </param> /// <param name="mediaSource"> /// The URL of a media file (either SWF or MP3) attached to this post. /// If SWF, you must also specify picture to provide a thumbnail for the video. /// </param> /// <param name="callback">The callback to use upon completion.</param> public static void FeedShare( string toId = "", Uri link = null, string linkName = "", string linkCaption = "", string linkDescription = "", Uri picture = null, string mediaSource = "", FacebookDelegate <IShareResult> callback = null) { FacebookImpl.FeedShare( toId, link, linkName, linkCaption, linkDescription, picture, mediaSource, callback); }
private static void OnDllLoaded() { var versionInfo = FBBuildVersionAttribute.GetVersionAttributeOfType(FacebookImpl.GetType()); if (versionInfo != null) { FbDebug.Log(string.Format("Finished loading Facebook dll. Version {0} Build {1}", versionInfo.SdkVersion, versionInfo.BuildVersion)); } FacebookImpl.Init( OnInitComplete, appId, cookie, logging, status, xfbml, FBSettings.ChannelUrl, authResponse, frictionlessRequests, OnHideUnity ); }
/** * @brief Post status update. * * @param message Message. * @param name Name. * @param picture Image URL. * @param link Link. * @param caption Caption. * @param description Description. * @param callback Callback to deal with a reponse to the request. * @see PostStatusUpdateDelegate */ public static void PostStatusUpdate(string message, string name, string picture, string link, string caption, string description, PostStatusUpdateDelegate callback) { Log.Debug("[Facebook] PostStatusUpdate"); FacebookImpl.PostStatusUpdate(message, name, picture, link, caption, description, callback); }
/** * @brief Post photo. * * @param message Message. * @param texture Image. * @param callback Callback to deal with a reponse to the request. * @see PostPhotoDelegate */ public static void PostPhoto(string message, Texture2D texture, PostPhotoDelegate callback) { Log.Debug("[Facebook] PostPhoto [message:" + message + "]"); FacebookImpl.PostPhoto(message, texture, callback); }
/** * @brief Delete inviters in Facebook service. * * @param playerIdList The list of player Id. * @param callback Callback to deal with a reponse to the request. * @see DeleteInvitersDelegate */ public static void DeleteInviters(List <string> facebookIdList, DeleteInvitersDelegate callback) { Log.Debug("[Facebook] DeleteInviters"); FacebookImpl.DeleteInviters(facebookIdList, callback); }
/** * @brief request the list of inviter who send invite request to me. * * @param callback Callback to deal with a reponse to the request. * @see InviteFBFriendsDelegate */ public static void RequestInviters(RequestInvitersDelegate callback) { Log.Debug("[Facebook] RequestInviters"); FacebookImpl.RequestInviters(callback); }
/** * @brief Invite Facebook friends who doesn't play this application. * * @param message Invite message. * @param title Facebook Invite dialog title. * @param callback Callback to deal with a reponse to the request. * @see InviteFriendsDelegate */ public static void InviteFriends(string message, string title, InviteFriendsDelegate callback) { Log.Debug("[Facebook] InviteFriends message:" + message + ", title:" + title); FacebookImpl.InviteFriends(message, title, callback); }
/** * @brief Request Facebook frineds. * * @param callback Callback to deal with a reponse to the request. * @see RequestFriendsDelegate */ public static void RequestFriends(RequestFriendsDelegate callback) { Log.Debug("[Facebook] RequestFriends"); FacebookImpl.RequestFriends(callback); }
public static void Login(string scope = "", FacebookDelegate callback = null) { FacebookImpl.Login(scope, callback); }
public static void GetDeepLink(FacebookDelegate callback) { FacebookImpl.GetDeepLink(callback); }
public static void PublishInstall(FacebookDelegate callback = null) { FacebookImpl.PublishInstall(AppId, callback); }
public static void API(string query, HttpMethod method, FacebookDelegate callback, WWWForm formData) { FacebookImpl.API(query, method, formData, callback); }
public static void API(string query, HttpMethod method, FacebookDelegate callback = null, Dictionary <string, string> formData = null) { FacebookImpl.API(query, method, formData, callback); }
public static void Logout() { FacebookImpl.Logout(); }
/** * @brief Post status update. * * @param name Name. * @param picture Image URL. * @param link Link. * @param caption Caption. * @param description Description. * @param extras Extras. * @param callback Callback to deal with a reponse to the request. * @see PostStatusUpdateDelegate */ public static void PostStatusUpdate(string name, string picture, string link, string caption, string description, Dictionary <string, string> extras, PostStatusUpdateDelegate callback) { Log.Debug("[Facebook] PostStatusUpdate"); FacebookImpl.PostStatusUpdate(name, picture, link, caption, description, extras, callback); }
/** * @brief Request my profile. * * @param callback Callback to deal with a reponse to the request. * @see RequestMyProfileDelegate */ public static void RequestMyProfile(RequestMyProfileDelegate callback) { Log.Debug("[Facebook] RequestMyProfile"); FacebookImpl.RequestMyProfile(callback); }
/** * @brief Add Permisions * * @param permissions Permissions. */ public static void AddPermissions(List <string> permissions) { Log.Debug("[Facebook] AddPermissions"); FacebookImpl.AddPermissions(permissions); }
public static void GameGroupJoin( string id, FacebookDelegate callback = null) { FacebookImpl.GameGroupJoin(id, callback); }