photo

android facebook publish photo

你说的曾经没有我的故事 提交于 2019-11-30 04:08:00
After looking on the net for 2 days I finally decided to post on SO. Well I simply want to publish a photo in my android app on to facebook. AM using the official android-facebook-sdk. I imported to example project and in the upload section add my code to upload photo. like mUploadButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { Bundle params = new Bundle(); params.putString("method", "photos.upload"); Bitmap temp = BitmapFactory.decodeResource(getResources(),R.drawable.facebook_icon); ByteArrayOutputStream baos = new ByteArrayOutputStream(); temp.compress(Bitmap

Getting a High Resolution picture from Facebook API

浪尽此生 提交于 2019-11-30 04:06:25
问题 Facebook FQL API for Photos states the maximum resolution for a photo returned from the API is 960x960: The Photo object has an equivalent src connection. Using photo_src FQL, you can retrieve images with the following dimensions: 960, 720, 480, 320, 180, 130, 75 pixels. However, some images are uploaded at a higher resolution. Sometimes even much higher. When browsing Facebook regularly, you can see these pictures and view their full size. However, I can't seem to find any way to get the

How to send a photo to Instagram using my Android app?

廉价感情. 提交于 2019-11-30 03:59:18
My app take photos and I want to share in Instagram. My app save the image in this directory File storagePath = new File(Environment.getExternalStorageDirectory() + "/DCIM/Camera/tubagram"); Now I'm trying to get the last picture I taked to share in Instagram using this code Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("image/*"); final ContentResolver cr = getContentResolver(); final String[] p1 = new String[] {MediaStore.Images.ImageColumns._ID, MediaStore.Images.ImageColumns.DATE_TAKEN}; Cursor c1 = cr.query(MediaStore.Images.Media.EXTERNAL

Storing photos and videos in Core Data?

那年仲夏 提交于 2019-11-30 02:32:00
I am developing an app that lets the user record videos and photos. Now I am wondering what is the best way to store them? The first idea is of course to save it in the user's photo library, just as if he had recorded the photo from the Camera app, and use a reference to the files. Now there's the problem that the user can access and delete files from the Photos application, which may be still needed by my app. I don't think that I can prevent the user from deleting photos, but how do I deal with the inconsistency my app will suffer from? The other way would be to take care of the storage

Android: Set contact photo in a ListView with name and number

南笙酒味 提交于 2019-11-29 23:14:41
问题 I'm creating an app that needs to display the phone contacts with its photo, name and number. I've created a ListView and can show contacts and numbers with a generic photo, but I can't show contat's picture. This is my code: Cursor cursor = getContacts(); String[] fields = new String[] {Contacts.DISPLAY_NAME, Phone.NUMBER}; SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.contact_entry, cursor, fields, new int[] {R.id.contactEntryText, R.id.contactEntryNumber});

How to make my iOS app visible in photo sharing options like Facebook and Twitter?

只愿长相守 提交于 2019-11-29 21:23:33
I have a picture sharing app which shares pictures among your app friends. My requirement is to show my app in sharing via pop-up, when iOS user choose any photo from photo gallery. I found solutions for sharing PDF files via custom app, but no luck for iOS "photos". I have also go through this link https://stackoverflow.com/questions/9266079/why-is-my-iOS-app-not-showing-up-in-other-apps-open-in-dialog and did changes in my app, but it seems not to be working. This can't be done, unfortunately. The screenshot you've shared is showing a UIActivityViewController presented by the Photos app, and

Get all photos of a page using Facebook API

家住魔仙堡 提交于 2019-11-29 19:39:43
I am new to Facebook API but I have to get all photos from a Facebook page. I managed to get a graph api query that returns all pictures of only the first ever created album on the page which is the profile picture album. For example: https://graph.facebook.com/227843870675663/photos But I need to do the same for all other existing albums in the page. Any pointers are really appreciated. try this and let me know how it goes for you, I've successfully pulled all photos. Ensure that you are an Admin of the Facebook Page. go to : http://developers.facebook.com/tools/explorer In the API Navigator,

Iterate through photo library on OS X?

回眸只為那壹抹淺笑 提交于 2019-11-29 12:06:52
I'm trying to iterate through a user's photo library on OS X. On iOS, I would use the Photos framework, but apparently that's not available on OS X , and we're supposed to use the Media Library framework instead. However, while I was able to use the code linked above to get access to a MLMediaSource object, I'm having a hard time figuring out how to iterate through the photo assets. The Media Library Framework documentation makes reference to a mediaObjectForIdentifier: method, which sounds promising, but doesn't indicate what sort of identifiers should be used. I'm fairly experienced with iOS

How do I save an ImageView as an image?

半腔热情 提交于 2019-11-29 09:38:26
I have an ImageView with a share intent( which works great, brings up all the apps I can share the image with), however, I can not share the photo because it has no path on my phone. How do I go about saving the ImageView on my phone? Below is my code. public void taptoshare(View v) { View content = findViewById(R.id.myimage); content.setDrawingCacheEnabled(true); Bitmap bitmap = content.getDrawingCache(); File file = new File("/DCIM/Camera/image.jpg"); try { file.createNewFile(); FileOutputStream ostream = new FileOutputStream(file); bitmap.compress(CompressFormat.JPEG, 100, ostream); ostream

Load image from photo library

北城余情 提交于 2019-11-29 09:00:43
How can I load an image from photo library and show it in imageView ? How can I change image to black and white ? To convert image form UIImagePickerController to black and white you can use this code: UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage]; // this image we get from UIImagePickerController CGColorSpaceRef colorSapce = CGColorSpaceCreateDeviceGray(); CGContextRef context = CGBitmapContextCreate(nil, originalImage.size.width, originalImage.size.height, 8, originalImage.size.width, colorSapce, kCGImageAlphaNone); CGContextSetInterpolationQuality(context