In C# Facebook MVC app template, how to get ads_read permission for my app?

159 views Asked by At

I'm using Facebook Template, as shown here. I'm using Microsoft.AspNet.Facebook by Microsoft and Facebook by Outercurve Foundation nuget packages.

Original code in HomeController looks like this:

    [FacebookAuthorize("email", "user_photos")]
    public async Task<ActionResult> Index(FacebookContext context)

When I tried to add ads-related permissions like that:

    [FacebookAuthorize("email", "user_photos", "ads_management", "ads_read")]
    public async Task<ActionResult> Index(FacebookContext context)

nohting changed. I expected that my app will generate two permission screens when I access it, just the way Graph Api Explorer does. Ads-related permissions should be on second screen. But it didn't, it simply displayed only the first screen, requesting access to my public profile.

So where / how I should declare my app needs access to ads and insights?

I already can read them, if I manually provide access token with proper permissions (for example, from PHP code). Only thing I don't know how to do is obtaining proper token - or forcing package to do it properly.

1

There are 1 answers

1
diiN__________ On

As you can see in this question, your app needs to get approved first. Look at this overview.