2012-12-04 59 views
0

目前我的facebook插件能夠將應用程序的URL發佈到用戶的牆上。但是,發佈的URL會作爲簡單的URL(鏈接)發佈。它看起來像這樣的時刻:如何強制Facebook顯示URL內容?

我已經發布了消息和http://www.site.com

我怎麼能強迫Facebook來獲取和顯示的URL的內容,並張貼沿着用戶的文本?事情是這樣的

我張貼的消息爲String和URL爲Uri。代碼如下。

private static final String MSG = "I have just posted a message and a link"; 
private static final String MSG2 = " to http://www.site.com"; 
private static final Uri MSG_URL = Uri.parse("http://www.site.com"); 
private void postMessageInThread() { 
     Thread t = new Thread() { 
      public void run() { 

       try { 
        facebookConnector.postMessageOnWall(MSG + 
          MSG2 + MSG_URL); 
        mFacebookHandler.post(mUpdateFacebookNotification); 
       } catch (Exception ex) { 
        Log.e(TAG, "Error sending msg", ex); 
       } 
      } 
     }; 
     t.start(); 
    } 
+0

後使用'link'參數的URL,而不是有它只是成爲消息的一部分。 https://developers.facebook.com/docs/reference/api/user/#links – CBroe

+0

@CBroe請將此添加爲答案,因爲這是正確的! – sandalone

回答