![](/img/trans.png)
[英]The Facebook instant game stops after the startAsync function terminates…so how can we call the shareAsync function on button click?
[英]How to try to invite friends on Facebook Instant Game SDK? (ShareAsync not working)
我想知道如何邀請或請求。 但是共享時FBInstant SDK不會問我任何目標ID。
我的代碼如下(Typescript),
const options : FBInstant.SharePayload = {
intent : "INVITE",
text : "SomeText",
image : base64Image, // exist.
data : {}
};
FBInstant.shareAsync(options);
這將顯示“ SHARE”窗口。 FBInstant.shareAsync()不能正常工作。
實際上,您應該為Instant Games中的邀請使用FBInstant.context.chooseAsync
/ FBInstant.context.createAsync
。 您的目標應該是將要一起玩的玩家移到同一上下文中(由FBInstant.context
方法指定)。
共享( shareAsync
)用於廣播共享,盡管有intent
參數,但對邀請而言並沒有太大用處。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.