Follow on Twitter using MGTwitterEngine iphone - iphone

I am using MGTwitterEngine for integrate Twitter on my iPhone application. so i want to follow a particular person using this library. can any one suggest me how i do this.
Thanks

I have not try to follow a user ..
Let try this metthod
-(NSString *)enableUpdatesFor:(NSString *)username
and let me know

Related

facebook using quickblox sdk instead of facebook-ios-sdk

Is it possible to integrate facebook in my app using quickblox sdk instead of facebook-ios-sdk ?
Sure, you can.
Download latest version of QuickBlox iOS SDK
http://quickblox.com/developers/IOS (1.2.0)
Make query
[QBUsers logInWithSocialProvider:#"facebook" delegate:self];
Enter you login & pass into webform
Catch result
// QuickBlox queries delegate
-(void)completedWithResult:(Result *)result{
// success result
if(result.success){
// User Login
if([result isKindOfClass:QBUUserLogInResult.class]){
QBUUserLogInResult *res = (QBUUserLogInResult *)result;
// Here is your Facebook access token
NSString *fbAccessToken = res.socialProviderToken;
NSDate *fbAccessTokenEpiresAt = res.socialProviderTokenExpiresAt
// Make query to Facebook Graph API with your access token
// ...
}else{
NSLog(#"Errors=%#", result.errors);
}
}
Also, You can see at ChattAR https://github.com/QuickBlox/ChattAR-ios src - we made some queries to Facebook Graph API without Facebook-ios-sdk
p.s. could you use 'quickblox' tag in QuickBlox related questions, thx.
You don't have to use the facebook sdk, it's just better to do so because they made the sdk, it's stable, it works... why recreate the wheel but, by all means, if you only want to do something simple then go for it.

How do I open a user's Twitter profile using the Twitter app using a link in Mobile Safari?

It looks like Twitter registers the URI scheme of twitter://, but after playing around with it I can't get it to directly open a user's profile. I've tried:
twitter://username
twitter://user/username
twitter://profile/username
with no luck. I'll need it to work on Android as well.
Thoughts?
I found two URL schemes for twitter tweetie:// and twitter://:
tweetie:///user?screen_name=jessicaalba
twitter:///user?screen_name=jessicaalba
On this wiki site you can find a lot of other iphone url schemes (including twitter)
Doesn't seem to be official documented anywhere so I wouldn't count on all versions of the Twitter app supporting it but http://groups.google.com/group/twitter-development-talk/browse_thread/thread/92b958b7af002993?pli=1 gives a hint that might be worth a try:
I just found that "twitter:///user?screen_name=tvdw" works as well.
I know you are looking specifically to open it up with the official Twitter app but what if the person doesn't have the app, then the functionality will not work in your app.
Why not just use MGTwitterEngine in this case since it will work for everyone and it will remain in your app?
For those wondering how to test if the scheme executes:
- (BOOL)openURL:(NSString *)url
- (void) clickTwitter {
if (![self openURL:#"twitter:///user?screen_name=mufumbo"]) {
if (![self openURL:#"tweetie:///user?screen_name=mufumbo"]) {
[self openURL:#"http://twitter.com/mufumbo"];
}
}
}
you can include many more and make it a generic loop.

how do I open iphone apps via phonegap

I want to open iphone apps like Contacts and Calendar from within my phonegap app, I don't mind that doing so will put my app in the background. I can open the browser and using window.open but how do I open other apps?
eg window.open("contacts://", '_blank'); doesn't work
The only way that one app, PhoneGap-based or otherwise, can cause another app to launch is to open an URL that uses the target app's custom URL scheme. So, if the Contacts app supports some custom scheme, you're in luck. If not, you're out of luck.
You are going to need to write a custom phonegap plugin so that you can access custom methods you write in objective C.
The official phonegap documentation is here.
I'll briefly explain how you will do this.
In your javascript you will call this code :
PhoneGap.exec("OpenMailAppPlugin.openMailApp",parameter1);
In objective C you will create a new file OpenMailAppPlugin class. Read the link above for exact instuctions, but the important method will be soemthing like this.
-(void) openMailApp:(NSMutableArray*)paramArray withDict:(NSMutableDictionary*)options {
NSString *parameter1 = [paramArray objectAtIndex:0]; //recieves information from javascript function
NSURL* mailURL = [NSURL URLWithString: #"mailto:%#?cc=bar#example.com&subject=Greetings%20from%Cupertino!&body=Wish%20you%20were%20here!",paramter1];
[[UIApplication sharedApplication] openURL: mailURL];
}
additionally, you may be interested in sending information back to your phonegap application. You can do this by injecting a javascript call that sends parameters. In your objective C function you would do something like this.
NSString * jsCallBack = [NSString stringWithFormat:#"myJavascriptFunction('%#');",parameter];
[self.webView stringByEvaluatingJavaScriptFromString:jsCallBack];
As previously answered, using a URL scheme can work. If you have several apps and you want to be able to open one from the other, then it's really simple when using PhoneGap build: you just need to add the URL scheme to your config.xml file, eg:
// In config.xml
<gap:url-scheme>
<scheme>app1scheme</scheme>
</gap:url-scheme>
Then from your other app you'll just have a link to app1scheme://, eg simply
Start App1
Here is the list of all the iOS/iPhone app url
Video - video:
Music - music:
Youtube - youtube.com
iTunes store - itms:
iBooks - itms-books:
App Store - itms-apps:
Mail sending - mailto:
Telephone - tel:
More can be found at this outdated link
http://www.wiki.akosma.com/IPhone_URL_Schemes
Look at this on how you can implement your's url
https://appurl.org/docs-handling-android
Need to use a plugin, unfortunately you need native ios code:
This one works:
https://github.com/phonegap/phonegap-plugins/tree/master/iOS/ExternalFileUtil

How to integrate location information into Twitter app?

I'm trying to get a Twitter iPhone app working using Matt Gemmell's MGTwitterEngine. I can post tweets OK, but I can't work out how to attach location data to those tweets... anyone have any idea?
I've never used MGTwitterEngine but from looking at the code, it should be as simple as calling sendUpdate:withLatitude:longitude:. What have you tried? What did and what did not work? Please be more specific.
There is no way to do post tweets with location information with MGTwitterEngine as of now. I am currently working on bringing the library up to date. You can check github.com/freeatnet/MGTwitterEngine/tree/v2-dev for updates. I'll be pushing a commit containing a method for geo-aware updates today.
UPD. See commit # http://github.com/freeatnet/MGTwitterEngine/commit/512be99cca9f5787192633455300dcd788c7830c for location-aware updates.
Method signatures:
(NSString *)sendUpdate:(NSString *)status;
(NSString *)sendUpdate:(NSString *)status fromLocationLat:(float)locLat locationLong:(float)locLong;
(NSString *)sendUpdate:(NSString *)status inReplyTo:(unsigned long long)updateID fromLocationLat:(float)locLat locationLong:(float)locLong;

MGTwitterEngine getting feeds - iPhone

So, in my app, I am trying to use MGTwitterEngine to read from a certain user on Twitter, and then log the recent posts in an array. Is it possible to do this with this library? I am trying to do this without logging in. Any help would be appreciate, thank you!
It can be easily done with MGTwitterEngine. You do it this way:
MGTwitterEngine *twitterng = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterng getUserTimelineFor:#"userName" sinceID:0 startingAtPage:0 count:8];
and it will call delegate method
- (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)connectionIdentifier
Hope this helps.
You need to get the feed url that contains the rss feeds. You don't need to login for that. Use MGTwitterEngine to get the tweets and set them into array. Then you simply need to reload the tableview.
Hope this helps.
Thanks,
Madhup