製品をチェック

無償トライアル:

無償トライアルへ

製品の情報と無償トライアルへ:

Facebook Ads ADO.NET Provider

Facebook Ads データに連携する.NET アプリケーションを素早く、簡単に開発できる便利なドライバー。

データ連携でお困りですか?

お問い合わせ

Powershell からの Facebook Ads データ連携タスクを自動化


PowerShell から Facebook Ads に簡単に接続する方法をお探しですか? CData ADO.NET Provider for FacebookAds は、PowerShell スクリプトの優位性を使い、シンプルで簡単に使えるADO.NET インターフェース を提供します。PowerShell スクリプトで、ADO.NET オブジェクトを使って簡単にFacebook Ads に接続して、同期、自動化、ダウンロードなどが可能!


加藤龍彦
ウェブデベロッパー



CData ADO.NET Provider for FacebookAds は、ADO.NET 標準インターフェースへ統合し、PowerShell のような. NET アプリケーションからFacebook Ads API へのデータ連携を可能にします。このプロバイダーは、Facebook Ads の認証および相互作用を簡単にします。このチュートリアルでは、PowerShell から直接SQL クエリを実行するための、いくつかの一般的なADO.NET オブジェクトの使い方を説明します。

CRUD コマンドの実行

次の3つのステップに従って SELECT クエリ PowerShell からリアルタイムFacebook Ads に実行:

  1. プロバイダーのアセンブリをロード:

    [Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for FacebookAds\lib\System.Data.CData.FacebookAds.dll")
  2. Facebook Ads に接続:

    Most tables require user authentication as well as application authentication. Facebook uses the OAuth authentication standard. To authenticate to Facebook, you can use the embedded OAuthClientId, OAuthClientSecret, and CallbackURL or you can obtain your own by registering an app with Facebook.

    See the Getting Started chapter of the help documentation for a guide to using OAuth.

    $constr = "" $conn= New-Object System.Data.CData.FacebookAds.FacebookAdsConnection($constr) $conn.Open()
  3. FacebookAdsDataAdapter のインスタンスを生成してSQL クエリを実行し、結果を出力:

    $sql="SELECT AccountId, Name from AdAccounts" $da= New-Object System.Data.CData.FacebookAds.FacebookAdsDataAdapter($sql, $conn) $dt= New-Object System.Data.DataTable $da.Fill($dt) $dt.Rows | foreach { Write-Host $_.accountid $_.name }