0
Я хотел бы получить список контактов пользователя с лица книги для этого я использую следующий кодне в состоянии перенаправить нужную страницу, используя логин с Scribe
public class FacebookLogin {
private static final String NETWORK_NAME = "Facebook";
private static final String PROTECTED_RESOURCE_URL = "https://graph.facebook.com/me";
private static final Token EMPTY_TOKEN = null;
OAuthService service = new ServiceBuilder()
.provider(FacebookApi.class)
.apiKey("Key")
.apiSecret("Pass")
.callback("http://localhost:8082/tt/FetchFacebookContact")
.build();
public String LoginToFacebook() {
System.out.println("=== " + NETWORK_NAME + "'s OAuth Workflow ===");
System.out.println();
// Obtain the Authorization URL
System.out.println("Fetching the Authorization URL...");
setUrl(service.getAuthorizationUrl(EMPTY_TOKEN));
System.out.println("Got the Authorization URL!");
System.out.println("Now go and authorize Scribe here:");
System.out.println(getUrl());
return "redirect";
}
После выполнения этого кода Page перенаправляется
https://www.facebook.com/dialog/oauth?client_id=23343&redirect_uri=
http%3A%2F%2Flocalhost%3A8082%2Ftt%2FFetchFacebookContact
Эта страница показывает
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Взятые пример из here
Как я могу получить правильную страницу.