我與Facebook分享遊戲工作,但我不斷收到此錯誤:無重載方法'FeedShare」需要'6' 參數的Facebook SDK V7.1.0團結
沒有重載方法FeedShare' takes
6的論點
這裏是我的代碼
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Facebook.Unity;
public class FBHolder : MonoBehaviour {
void Awake()
{
FB.Init (SetInit, OnHideUnity);
}
private void SetInit()
{
Debug.Log ("Facebook Init done");
if (FB.IsLoggedIn) {
Debug.Log ("Facebook logged in");
} else {
FBLogin();
}
}
private void OnHideUnity (bool isGameShown)
{
if (!isGameShown) {
Time.timeScale = 0;
} else {
Time.timeScale = 1;
}
}
void FBLogin()
{
var perms = new List<string>(){"public_profile", "email", "user_friends"};
FB.LogInWithReadPermissions (perms, AuthCallback);
}
private void AuthCallback (ILoginResult result) {
if (FB.IsLoggedIn) {
Debug.Log("FB Login Worked");
// share facebook
FB.FeedShare(
link: "https://enterlinkhere.com",
linkName: "PollyCube",
linkCaption: "LinkCaption",
linkDescription: "LinkDescription",
picture: "https://enterimagehere.com",
callback: LogCallback
);
}
else {
Debug.Log("User cancelled login");
}
}
void LogCallback(IResult response) {
Debug.Log("Worked");
}
}
,這是爲Facebook Feedshare(也是我的代碼張貼以上)的代碼
FB.FeedShare(
link: "https://enterlinkhere.com",
linkName: "PollyCube",
linkCaption: "LinkCaption",
linkDescription: "LinkDescription",
picture: "https://enterimagehere.com",
callback: LogCallback
);
void LogCallback(IResult response) {
Debug.Log("Worked");
}
我使用這個文檔的情況下,使這個你想知道在那裏我得到這個從
https://developers.facebook.com/docs/unity/reference/current/FB.FeedShare