Android Pinterest SDK:无法上载

Android Pinterest SDK:无法上载,android,pinterest,Android,Pinterest,我正在尝试使用Android Pin-It SDK将PinIt与我的应用程序集成,但它给了我类似的错误 Pin无法升级,请重试 这是我的密码 // pin it PinItButton.setDebugMode(true); PinItButton.setPartnerId(CLIENT_ID); PinItButton pinIt = (PinItButton) findViewById(R.id.pin_bt); pinIt.setImageResource(R.drawable.icon

我正在尝试使用Android Pin-It SDK将PinIt与我的应用程序集成,但它给了我类似的错误

Pin无法升级,请重试

这是我的密码

// pin it
PinItButton.setDebugMode(true);
PinItButton.setPartnerId(CLIENT_ID);

PinItButton pinIt = (PinItButton) findViewById(R.id.pin_bt);
pinIt.setImageResource(R.drawable.icon_pinterest);
pinIt.setImageUrl("http://images.frandroid.com/wp-content/uploads/2012/11/Test-LG-Nexus-4-Gauche.png");
pinIt.setUrl("http://images.frandroid.com/wp-content/uploads/2012/11/Test-LG-Nexus-4-Gauche.png");
pinIt.setDescription(offerData.getOffer_description());     
pinIt.setListener(_listener);

PinItListener _listener = new PinItListener() {

    @Override
    public void onStart() {
        super.onStart();
        Log.i(APP_TAG, "PinItListener.onStart");
        statistics();
    }

    @Override
    public void onComplete(boolean completed) {
        super.onComplete(completed);
        if(completed)
            Log.i(APP_TAG, "PinItListener.onComplete");
        else
            Log.e(APP_TAG, "PinItListener.NotComplete");
    }

    @Override
    public void onException(Exception e) {          
        super.onException(e);
        e.printStackTrace();
        Log.i(APP_TAG, "PinItListener.onException");
    }

};
有人知道这个代码有什么问题吗

First declare this in onCreate() of activity:

PinIt pinIt=new PinIt();

after that use this method in your pinit button click and pass imageUrl and description:

public void pinImageOnPinterest(String imageUrl,String description){
        PinIt.setPartnerId(CLIENT_ID);
        pinIt.setImageUrl(imageUrl);
        pinIt.setDescription(description);
        pinIt.setUrl("your set url");
        pinIt.setListener(new PinItListener() {
              @Override
            public void onStart() {
                // TODO Auto-generated method stub
                super.onStart();
            }

               @Override
            public void onComplete(boolean completed) {
                // TODO Auto-generated method stub
                   super.onComplete(completed);
                   if(completed){
                       Log.w("pinit", "Image posted on pinterest");
                       //Toast.makeText(getActivity(), "Image Posted", Toast.LENGTH_SHORT).show();
                   }
            }
               @Override
            public void onException(Exception e) {
                // TODO Auto-generated method stub
                   super.onException(e);
                   Toast.makeText(getActivity(), "Please install Pinterest App", Toast.LENGTH_SHORT).show();
                   Log.w("pinit", "pinit exception :"+e);

            }
        });
        pinIt.doPinIt(getActivity());
    }

希望这能对您有所帮助。

您能解决这个问题吗?面对同样的问题