close

How to at Visual Studio 2012 Install Facebook SDK ?

有兩種方式:

1. 使用管理 NuGet 套件。

2. 使用套件管理器主控台,但這要下 PowerShell Commands。

 

使用管理 NuGet 套件。

Step1:開啟 VS > 新增一個專案,在「專案」或「參考」按滑鼠右鍵 > 管理 NuGet 套件。

201403222249  

Step2:搜尋 "Facebook" 關鍵字,如果要解除安裝;只要在已「安裝的套件」點選「解除安裝」即可。

201403222255  

 

使用套件管理器主控台

Step1:點選 > 工具 > 程式庫套件管理員 > 套件管理器主控台。

201403222300  

Step2:在執行指令 Install-Package Facebook,指令詳細可參考 PowerShell。

201403222303  

Step3:如果是要解除安裝...可執行指令 Uninstall-Package Facebook。

201403222307  

最後這樣就可以在程式碼中引用命名空間。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using Facebook.Reflection;

 

 

Reference:http://www.nuget.org/packages/facebook

Reference:http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference

Reference:https://docs.nuget.org/docs/start-here/using-the-package-manager-console

arrow
arrow
    文章標籤
    C# Facebook SDK Facebook SDK
    全站熱搜

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