Tag: instagram

如何用JavavalidationInstagram的实时API x-hub-signature?

我正在使用Play框架为Instagram实时API开发消费者。 但仍然无法正确执行x-hub-signaturevalidation。 那么,我们如何使用Java和Play框架执行Instagram x-hub-signaturevalidation呢? 这是我目前的代码: 在Play框架中,我使用此方法获取JSON有效内容: public static Result receiveInstaData(){ JsonNode json = request().body().asJson(); //obtain the x-hub-signature from the header //obtain the corresponding client secret VerificationResult verificationResult = SubscriptionUtil.verifySubscriptionPostSignature( clientSecret, json.toString(), xHubSignature); if(verificationResult.isSuccess()){ //do something } } 然后在SubscriptionUtil ,我使用以下代码执行validation: public static VerificationResult verifySubscriptionPostSignature(String clientSecret, String rawJsonData, String xHubSignature) { SecretKeySpec keySpec; keySpec = new SecretKeySpec(clientSecret.getBytes(“UTF-8”), […]

Apache Oltu Instragram集成不返回access_token …为什么?

我正在开发Spring MVC + Apache Oltu + Instagram示例。 在这个例子中,我在https://www.instagram.com/developer/上创建了一个App,我得到了ClientId和Client_Secrete 。 使用此clientId和Client Secrete Secrete,调用Instagram Rest EndPoints 。 但是当调用REST EndPoint时,我收到以下错误: SEVERE: Servlet.service() for servlet [appServlet] in context with path [/apache-oltu] threw exception [Request processing failed; nested exception is OAuthProblemException{error=’invalid_request’, description=’Missing parameters: access_token’, uri=’null’, state=’null’, scope=’null’, redirectUri=’null’, responseStatus=0, parameters={}}] with root cause OAuthProblemException{error=’invalid_request’, description=’Missing parameters: access_token’, uri=’null’, state=’null’, scope=’null’, […]