public void GetBasicUserProfile(ActionSuccessCallback callback = null) { Debug.Log("Get Basic User Profile"); if (FB.IsInitialized && FB.IsLoggedIn) { actionGetBasicUserProfileCallback = callback; FB.API("me?fields=id,name", HttpMethod.GET, GetBasicUserProfileCallback); } }
public void GetPictureProfile(ActionSuccessCallback callback = null) { Debug.Log("Get Picture Profile"); if (FB.IsInitialized && FB.IsLoggedIn) { actionGetPictureProfileCallback = callback; FB.API("me/picture?type=large&fields=url&redirect=false", HttpMethod.GET, GetPictureProfileCallback); } }
public void GetBasicUserProfile(ActionSuccessCallback callback = null) { Debug.Log("Get Basic User Profile"); if (FB.IsInitialized && FB.IsLoggedIn) { actionGetBasicUserProfileCallback = callback; FB.API("me?fields=id,name", HttpMethod.GET, GetBasicUserProfileCallback); } }
public void FeedAPI(LuviFacebookFeedAPI feed, ActionSuccessCallback callback = null) { Debug.Log("FeedAPI"); actionFeedAPICallback = callback; openFeed = feed; WWWForm form = new WWWForm(); form.AddField("link", openFeed.url); form.AddField("name", openFeed.header); form.AddField("caption", openFeed.caption); form.AddField("description", openFeed.description); form.AddField("picture", openFeed.picture); form.AddField("actions", "[{'name':'picture','link':'" + openFeed.picture + "'}]"); FB.API("/me/feed", HttpMethod.POST, FeedAPICallback, form); }
public void Login(ActionSuccessCallback callback = null) { if (FB.IsLoggedIn) { if (callback != null) { callback(false); } return; } Debug.Log("Login|permission: " + defaultPermission); actionLoginCallback = callback; FB.Login(defaultPermission, LoginCallBack); }
public void FeedAPI(LuviFacebookFeedAPI feed, ActionSuccessCallback callback = null) { Debug.Log("FeedAPI"); actionFeedAPICallback = callback; openFeed = feed; WWWForm form = new WWWForm(); form.AddField("link", openFeed.url); form.AddField("name", openFeed.header); form.AddField("caption", openFeed.caption); form.AddField("description", openFeed.description); form.AddField("picture", openFeed.picture); form.AddField("actions", "[{'name':'picture','link':'" + openFeed.picture + "'}]"); FB.API("/me/feed", HttpMethod.POST, FeedAPICallback, form); }
public void OpenFeedDialog(LuviFacebookFeedAPI feed, ActionSuccessCallback callback = null) { Debug.Log("Open Feed Dialog"); if (FB.IsInitialized && FB.IsLoggedIn) { actionFeedDialogCallback = callback; openFeed = feed; FB.Feed( link: openFeed.url, linkName: openFeed.header, linkCaption: openFeed.caption, linkDescription: openFeed.description, picture: openFeed.picture, callback: OpenFeedCallback ); } }
public IEnumerator GetPictureProfileFromURL(string url, ActionSuccessCallback callback = null) { WWW geturl = new WWW(url); yield return(geturl); if (!string.IsNullOrEmpty(geturl.error)) { Debug.Log("Error to get picture URL"); if (callback != null) { callback(false); } yield break; } userProfilePicture = new Texture2D(128, 128, TextureFormat.DXT1, false); geturl.LoadImageIntoTexture(userProfilePicture); Debug.Log("Done to get picture"); if (callback != null) { callback(true); } }
public void OpenFeedDialog(LuviFacebookFeedAPI feed, ActionSuccessCallback callback = null) { Debug.Log("Open Feed Dialog"); if (FB.IsInitialized && FB.IsLoggedIn) { actionFeedDialogCallback = callback; openFeed = feed; FB.Feed( link: openFeed.url, linkName: openFeed.header, linkCaption: openFeed.caption, linkDescription: openFeed.description, picture: openFeed.picture, callback: OpenFeedCallback ); } }
public void Login(string permission, ActionSuccessCallback callback = null) { defaultPermission = permission; Login(callback); }
public void Login(ActionSuccessCallback callback = null) { if (FB.IsLoggedIn) { if (callback != null) callback(false); return; } Debug.Log("Login|permission: " + defaultPermission); actionLoginCallback = callback; FB.Login(defaultPermission, LoginCallBack); }
public IEnumerator GetPictureProfileFromURL(string url, ActionSuccessCallback callback = null) { WWW geturl = new WWW(url); yield return geturl; if (!string.IsNullOrEmpty(geturl.error)) { Debug.Log("Error to get picture URL"); if (callback != null) callback(false); yield break; } userProfilePicture = new Texture2D(128, 128, TextureFormat.DXT1, false); geturl.LoadImageIntoTexture(userProfilePicture); Debug.Log("Done to get picture"); if (callback != null) callback(true); }
public void GetPictureProfile(ActionSuccessCallback callback = null) { Debug.Log("Get Picture Profile"); if (FB.IsInitialized && FB.IsLoggedIn) { actionGetPictureProfileCallback = callback; FB.API("me/picture?type=large&fields=url&redirect=false", HttpMethod.GET, GetPictureProfileCallback); } }
public void Login(string permission, ActionSuccessCallback callback = null) { defaultPermission = permission; Login(callback); }