2013-04-24 15:59:54 +08:00
|
|
|
#include "SocialTwitter.h"
|
|
|
|
#include "PluginUtils.h"
|
|
|
|
|
|
|
|
namespace cocos2d { namespace plugin {
|
|
|
|
|
|
|
|
PLUGIN_REGISTER_IMPL(SocialTwitter)
|
|
|
|
|
|
|
|
SocialTwitter::~SocialTwitter()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief plugin initialization
|
|
|
|
*/
|
|
|
|
bool SocialTwitter::init()
|
|
|
|
{
|
|
|
|
return PluginUtils::initJavaPlugin(this, "org.cocos2dx.plugin.SocialTwitter");
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief initialize the developer info
|
|
|
|
@param devInfo This parameter is the info of developer, must contains key:
|
2013-04-24 16:53:02 +08:00
|
|
|
TwitterKey The consumerkey of twitter account
|
|
|
|
TwitterSecret The consumersecret of twitter account
|
|
|
|
More: https://dev.twitter.com
|
2013-04-24 15:59:54 +08:00
|
|
|
@warning Must invoke this interface before other interfaces.
|
|
|
|
And invoked only once.
|
|
|
|
*/
|
2013-04-24 16:53:02 +08:00
|
|
|
void SocialTwitter::initDeveloperInfo(TSocialDevInfo devInfo)
|
2013-04-24 15:59:54 +08:00
|
|
|
{
|
|
|
|
ProtocolSocial::initDeveloperInfo(devInfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief pay for product
|
|
|
|
@param info The info of product, must contains key:
|
2013-04-24 16:53:02 +08:00
|
|
|
SharedText The text need to share
|
|
|
|
SharedImagePath The full path of image file need to share (optinal)
|
2013-04-24 15:59:54 +08:00
|
|
|
*/
|
|
|
|
void SocialTwitter::share(TShareInfo info)
|
|
|
|
{
|
|
|
|
ProtocolSocial::share(info);
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* SocialTwitter::getSDKVersion()
|
|
|
|
{
|
|
|
|
return ProtocolSocial::getSDKVersion();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SocialTwitter::setDebugMode(bool debug)
|
|
|
|
{
|
|
|
|
ProtocolSocial::setDebugMode(debug);
|
|
|
|
}
|
|
|
|
|
|
|
|
}} // namespace cocos2d { namespace plugin {
|