I code to post to wall Facebook as below:
- (void)publishStream{
NSLog(#"body %#",bodyMeaning);
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
#"SAOL Dictionary",#"message",
#"http://developers.facebook.com/docs/reference/dialogs/", #"link",
#"http://bit.ly/riDGff", #"picture",
keyword, #"name",
#"Facebook caption example." , #"caption",
facebookBody, #"description",
nil];
NSLog(#"%#",bodyMeaning);
[_facebook requestWithGraphPath:#"me/feed" andParams:params andHttpMethod:#"POST" andDelegate:self];
}
When it appear in wall : Facebook caption example.
But i want to appear as: Facebook
Caption
Example.
(new lines format)
Any body know this please help me!.
Thanks all.
try to add
<center></center>
as the new line character
Related
I'm new to Instagram and Instagram development. My company wants to create a hashtag and have people submit photos to it, but able to curate those photos. That is, my company wants to be able to delete some submissions, or at least make them invisible in the hashtag feed. Is this possible?
I don't think it is possible. You cannot control the use of a hashtag by other people in Instagram. Anyone can use your hashtag for 'irrelevant' photo and the only way to get it invisible from the hashtag feed is if the owner of a photo removes the hashtag from that particular photo.
Yes it is possible to delete Instagram post.
Please refer this link and download files from Github:
https://github.com/mgp25/Instagram-API
<?php
require '../src/Instagram.php';
/////// CONFIG ///////
$username = '';
$password = '';
$debug = false;
$photo = ''; // path to the photo
$caption = null; // caption
//////////////////////
$insta = new Instagram($username, $password, $debug);
try{
$instaId = '1435464203242425768_3770950408'; //Like this post Id
$reply = $insta->deleteMedia($instaId);
}catch(Exception $g){
$g->getMessage();
}
I'm working on a project in which I'm using the mail-core iphone api to send and retrieve mail. I have tried a lot of things, but have been unable to find any solution. I've tried searching but haven't found any solution. Could someone explain how to use the mail-core api to send attachments?. If anybody knows how to do that please let me know.
I haven't tested this but if you look at the header for CTCoreMessage, it does have a method addAttachment:. Argument for this is a CTCoreAttachment object.
Add this only and only after you setBody or setHTMLBody:
// Set Attachments
NSString *filePrefix = [[NSBundle mainBundle] bundlePath];
NSString *path = [NSString stringWithFormat:#"%#/%#",filePrefix,#"TestData/DSC_6201.jpg"];
NSLog(#"path:%#", path);
CTCoreAttachment *attach = [[CTCoreAttachment alloc] initWithContentsOfFile:path];
if ([attach data]==nil) {
NSLog(#"Error: attachment data is nil");
}
[myMessage addAttachment:attach];
Here, you should add TestData folder with image to your project as a folder reference
I use this code to post in facebook from my app in iphone
NSString *title=[NSString stringWithFormat:#"Posted from Poems of Love v2 iPhone/iPod/iPad touch app - { Poem Name: "];
//& titletext.text & ""\",";
NSString *alltitle= [title stringByAppendingString:poemtitle.text];
alltitle= [alltitle stringByAppendingString:#" } - { Author:"];
alltitle= [alltitle stringByAppendingString:authorname.text];
NSString *alltitle1= [alltitle stringByAppendingString:#" }"];
NSString *list = poembody.text;
NSString *kAppId=#"numid";
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, #"app_id",
#"http://www.poemsofloveapp.com", #"link",
#"http://3.bp.blogspot.com/_co4MVQE_2l0/TPRh6TBjaZI/AAAAAAAAAOg/E0kgWLd4ieE/s1600/poemsoflovev2logo.png", #"picture",
alltitle1, #"name",
#"\nhttp://www.poemsofloveapp.com - Join us on facebook!\n", #"caption",
list, #"description",
#"",#"message",
nil];
[mainDelegate._session dialog:#"feed" andParams:params andDelegate:self];
The dialog shows up i tap skip or publish and then a second dialog shows up which is empty! no message on it nothing
Why is this happening?
My mistake sorry guys i called [mainDelegate._session dialog:#"feed" andParams:params andDelegate:self];
two times previously stupid i know!!!
I have got a url http://stream.alayam.com/alayam/alayam/playlist.m3u8 and wanted to play in iPhone, with m3u8 format, I have successfully got the voice, however movie is not coming. I have used MPMEDIAPLAYER framework and other things.
I am giving u answer in new answer because code will be more readable.
I just download MPMovieController example from Apple website and then add your link with http://
In NSURL i pass link http://stream.alayam.com/alayam/alayam/playlist.m3u8 not this one stream.alayam.com/alayam/alayam/playlist.m3u8 and it works fine.
-(void)initAndPlayMovie:(NSURL *)movieURL
{
// Initialize a movie player object with the specified URL
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
if (mp)
{
// save the movie player object
self.moviePlayer = mp;
[mp release];
// Apply the user specified settings to the movie player object
[self setMoviePlayerUserSettings];
// Play the movie!
[self.moviePlayer play];
}
}
Hi all
I've create simple movie player in iPhone development. But i got just only vedio's voice.
Here is my code (when button click),
-(IBAction)playMe{
NSBundle *bundle=[NSBundle mainBundle];
NSString *moviePath=[bundle pathForResource:#"iiii" ofType:#"mp4"];
NSURL *movieURL = [NSURL fileURLWithPath:moviePath];
MPMoviePlayerController *theMovie=[[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
[self.view addSubview:theMovie.view];
}
When i click i got only voice not with movie. I also used iOS 4.1 simulator.
it may be because of you have not set frame to display movie player try this.
theMovie.view.frame=CGRectMake(0,0,300.400);
If this does not work
you can check out following tutorials
http://www.edumobile.org/iphone/iphone-programming-tutorials/how-to-play-video-in-iphoneos4/
http://iosdevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html
http://www.devx.com/wireless/Article/44642/1954
http://iosdevelopertips.com/video/how-to-play-movies-from-application-bundle-or-from-a-remote-server-url.html