這篇介紹遊戲內添加社交分享的方法

 

1. Facebook: Getting Started: 建立Facebook Developer帳戶
並且取得應用程式的Key
Facebook: GameMaker:Studio:
File -> Preferences
Resource -> Change Global Game Settings

Coding Your Game:
一開始先用code初始化
facebook_init();
permissions = ds_list_create();
ds_list_add(permissions,"publish_stream");
facebook_login(permissions);
ds_list_destroy(permissions);
然後用facebook_post_message()來傳送訊息

01.png

 

2. Twitter: 在Resource的Scripts可以Create Script
並且在內部添加程式碼

Sending The Tweet:
tweet分享只需要用參數的方式傳遞即可

02.png  

arrow
arrow
    文章標籤
    GameMaker Social Gaming
    全站熱搜

    RX1226 發表在 痞客邦 留言(0) 人氣()