<?xml version="1.0" encoding="UTF-8"?>
<beans:beans
		xmlns="http://www.springframework.org/schema/integration"
		xmlns:beans="http://www.springframework.org/schema/beans"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:context="http://www.springframework.org/schema/context"
		xmlns:twitter="http://www.springframework.org/schema/integration/twitter"
		xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
						http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
						http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd
						http://www.springframework.org/schema/integration/twitter https://www.springframework.org/schema/integration/twitter/spring-integration-social-twitter.xsd">

	<message-history/>

	<context:property-placeholder location="classpath:sample.properties"/>

	<beans:bean id="twitterTemplate" class="org.springframework.social.twitter.api.impl.TwitterTemplate">
		<beans:constructor-arg value="${twitter.oauth.consumerKey}"/>
		<beans:constructor-arg value="${twitter.oauth.consumerSecret}"/>
		<beans:constructor-arg value="${twitter.oauth.accessToken}"/>
		<beans:constructor-arg value="${twitter.oauth.accessTokenSecret}"/>
	</beans:bean>

	<channel id="search" />

	<twitter:search-outbound-gateway request-channel="search" twitter-template="twitterTemplate"
		reply-channel="inbound" />

	<service-activator input-channel="inbound" ref="twitterAnnouncer" method="searchResult"/>

	<beans:bean id="twitterAnnouncer" class="org.springframework.integration.twitter.ignored.TwitterAnnouncer" />

</beans:beans>
