axmol/plugin/plugins/twitter/platform/android/SocialTwitter.cpp

56 lines
1.3 KiB
C++
Raw Normal View History

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 config the developer info
2013-04-24 15:59:54 +08:00
@param devInfo This parameter is the info of developer, must contains key:
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.
*/
void SocialTwitter::configDeveloperInfo(TSocialDeveloperInfo devInfo)
2013-04-24 15:59:54 +08:00
{
ProtocolSocial::configDeveloperInfo(devInfo);
2013-04-24 15:59:54 +08:00
}
/**
@brief pay for product
@param info The info of product, must contains key:
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 {