mirror of https://github.com/axmolengine/axmol.git
56 lines
1.3 KiB
C++
Executable File
56 lines
1.3 KiB
C++
Executable File
#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:
|
|
TwitterKey The consumerkey of twitter account
|
|
TwitterSecret The consumersecret of twitter account
|
|
More: https://dev.twitter.com
|
|
@warning Must invoke this interface before other interfaces.
|
|
And invoked only once.
|
|
*/
|
|
void SocialTwitter::initDeveloperInfo(TSocialDevInfo devInfo)
|
|
{
|
|
ProtocolSocial::initDeveloperInfo(devInfo);
|
|
}
|
|
|
|
/**
|
|
@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)
|
|
*/
|
|
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 {
|