问题描述
我正在考虑一个使用insta API的项目,但是当我注册instagramdeveloper帐户时,我遇到了一些问题.我找不到用于创建新客户端的按钮,当我点击管理客户端"按钮时,这就是我得到的:
I am thinking on a project that uses insta APIs but when I signup for instagramdeveloper account I have some kinda issue with it. I cannot find a button to create new Client and when I hit Manage client button this is what I got:
当我按下注册禁用"按钮时,什么都没有发生.这是否意味着我禁止使用Instagram开发者帐户?请注意,自创建Instagram开发者帐户以来,我尚未创建任何类型的客户ID.
when I hit Registration Disabled button Nothing Happens. Is that mean am I ban from an Instagram developer account? please note I haven't created any kind of Client ID since I created an Instagram developer account.
或者这是某种错误?我如何向Instagram支持团队报告我的问题?感谢您的建议:)
OR was this some kinda bug?How can I report my issue to the Instagram support team?your suggestions are appreciated:)
推荐答案
我也不知道为什么我的注册按钮也被禁用了.也许Instagram api更新.但是我意识到了本指南,并且对我有用. https://developers.facebook.com/docs/instagram- basic-display-api/getting-started
I dont know why my registration button is disabled too. Maybe Instagram api update. But I realize this guide and It works for me. https://developers.facebook.com/docs/instagram-basic-display-api/getting-started
已更新:
就我而言,我在android中使用webview.因此,下面是示例代码:(忽略对话框,您只能实现webview及其onpagefinished方法)
In my case, i am using webview in android. So, below is the example code :(Ignore the Dialog, you can implement only webview and its onpagefinished method)
public class AuthenticationDialog extends Dialog {
private String TAG = AuthenticationDialog.class.getSimpleName();
private AuthenticationListener listener;
private Context context;
private WebView webView;
private final String url = "https://api.instagram.com/" + "oauth/authorize/?app_id=" +
getResources().getString(R.string.app_id)
+ "&redirect_uri="
+ getResources().getString(R.string.redirect_url)
+ "&response_type=code"
+ "&scope=user_profile,user_media";
public AuthenticationDialog(@NonNull Context context, AuthenticationListener listener) {
super(context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);
this.context = context;
this.listener = listener;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.auth_dialog);
this.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
initializeWebView();
}
private void initializeWebView() {
webView = (WebView) findViewById(R.id.webView);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl(url);
Log.d(TAG, "url: " + url);
webView.setWebViewClient(new WebViewClient() {
String access_token;
boolean authComplete;
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
Log.d(TAG, "onPageStarted called");
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
Log.d(TAG, "onPageFinished called " + url);
if (url.contains("?code=") && !authComplete) {
Log.d(TAG, " inside access_token");
access_token = url;
//get the whole token after "=" sign
access_token = access_token.replace("https://www.instagram.com/?code=","");
access_token = access_token.replace("#_","");
Log.d(TAG, "token: " + access_token);
authComplete = true;
listener.onTokenReceived(access_token);
webView.loadUrl("https://instagram.com/accounts/logout/");
dismiss();
} else if (url.contains("?error")) {
Log.d(TAG, "getting error fetching access token");
dismiss();
} else {
Log.d(TAG, "outside both" + url.toString());
}
}
});
}
}
这篇关于如何找到Instagram开发人员支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!